int DataSignal :: AddAllSmartMessageReporters () { int k = GetObjectScope (); int size = SmartMessage::GetSizeOfArrayForScope (k); int i; int nMsgs = 0; SmartMessageReporter* newMsg; SmartMessage* nextSmartMsg; SmartMessageData target; SmartMessageData* smd; bool call; for (i=0; i<size; i++) { if (!mMessageArray [i]) continue; nextSmartMsg = SmartMessage::GetSmartMessageForScopeAndElement (k, i); call = nextSmartMsg->EvaluateCall (mMessageArray); if (!call) mDoNotCall = true; if (!nextSmartMsg->EvaluateReport (mMessageArray)) continue; target.SetIndex (i); smd = (SmartMessageData*) mMessageDataTable->Find (&target); newMsg = new SmartMessageReporter; newMsg->SetSmartMessage (nextSmartMsg); if (smd != NULL) newMsg->SetData (smd); newMsg->SetPriorityLevel (nextSmartMsg->EvaluateReportLevel (mMessageArray)); newMsg->SetRestrictionLevel (nextSmartMsg->EvaluateRestrictionLevel (mMessageArray)); newMsg->SetDoNotCall (!call); nMsgs = AddSmartMessageReporter (newMsg); } MergeAllSmartMessageReporters (); return nMsgs; }
int CoreBioComponent :: AddAllSmartMessageReporters () { int k = GetObjectScope (); int size = SmartMessage::GetSizeOfArrayForScope (k); int i; int nMsgs = 0; SmartMessageReporter* newMsg; SmartMessage* nextSmartMsg; SmartMessageData target; SmartMessageData* smd; for (i=1; i<=mNumberOfChannels; i++) mDataChannels [i]->AddAllSmartMessageReporters (); for (i=0; i<size; i++) { if (!mMessageArray [i]) continue; nextSmartMsg = SmartMessage::GetSmartMessageForScopeAndElement (k, i); if (!nextSmartMsg->EvaluateReport (mMessageArray)) continue; target.SetIndex (i); smd = (SmartMessageData*) mMessageDataTable->Find (&target); newMsg = new SmartMessageReporter; newMsg->SetSmartMessage (nextSmartMsg); if (smd != NULL) newMsg->SetData (smd); newMsg->SetPriorityLevel (nextSmartMsg->EvaluateReportLevel (mMessageArray)); newMsg->SetRestrictionLevel (nextSmartMsg->EvaluateRestrictionLevel (mMessageArray)); nMsgs = AddSmartMessageReporter (newMsg); } MergeAllSmartMessageReporters (); return nMsgs; }