// TrfReportingObject.cpp #include "TrfReportingObject.h" #include "Reporter.h" #include "ReporterPtr.h" using trf::TrfReportingObject; using trf::ReporterPtr; using trf::Reporter; //********************************************************************** // Add a reporter. void TrfReportingObject::add_reporter(Reporter* rep) { _reps.push_back(rep); } //********************************************************************** // Send a message to all reporters. void TrfReportingObject::report(const AbsMessage& msg) const { for ( ReporterList::iterator irep=_reps.begin(); irep!=_reps.end(); ++irep ) { Reporter& rep = **irep; rep.report(msg); } } //**********************************************************************