| 1046 | } |
| 1047 | |
| 1048 | void cDeme::AddEventReceivedCenterPred(int times) |
| 1049 | { |
| 1050 | if (cell_events.GetSize() == 0) { |
| 1051 | cerr<<"Error: An EventReceivedCenterPred cannot be created until a CellEvent is added.\n"; |
| 1052 | exit(1); |
| 1053 | } |
| 1054 | |
| 1055 | for (int i = 0; i < cell_events.GetSize(); i++) { |
| 1056 | if (!cell_events[i].IsDead()) { |
| 1057 | int sink_cell = GetCellID(GetSize()/2); |
| 1058 | cOrgMessagePred_EventReceivedCenter* pred = |
| 1059 | new cOrgMessagePred_EventReceivedCenter(&cell_events[i], sink_cell, times); |
| 1060 | m_world->GetStats().AddMessagePredicate(pred); |
| 1061 | message_pred_list.Push(pred); |
| 1062 | } |
| 1063 | } |
| 1064 | } |
| 1065 | |
| 1066 | void cDeme::AddEventReceivedLeftSidePred(int times) |
| 1067 | { |
no test coverage detected