#include <Signaler.h>
Public Types | |
typedef Observer< const T * > * | slot_type |
Public Member Functions | |
void | connect (Observer< const T * > *iObs) |
does not take ownership of memory | |
void | connect (Observer< const T * > &iObs) |
does not take ownership of memory | |
void | operator() (const T *iSignal) const |
Signaler () | |
virtual | ~Signaler () |
Private Member Functions | |
const Signaler & | operator= (const Signaler &) |
Signaler (const Signaler &) | |
void | update (const T *iData) |
This routine will be called when the appropriate signal arrives. | |
Private Attributes | |
std::vector< Observer< const T * > * > | observers_ |
Definition at line 37 of file Signaler.h.
typedef Observer<const T*>* sim_act::Signaler< T >::slot_type |
Definition at line 41 of file Signaler.h.
sim_act::Signaler< T >::Signaler | ( | ) | [inline] |
Definition at line 42 of file Signaler.h.
{}
virtual sim_act::Signaler< T >::~Signaler | ( | ) | [inline, virtual] |
Definition at line 43 of file Signaler.h.
{}
sim_act::Signaler< T >::Signaler | ( | const Signaler< T > & | ) | [private] |
void sim_act::Signaler< T >::connect | ( | Observer< const T * > * | iObs | ) | [inline] |
does not take ownership of memory
Definition at line 60 of file Signaler.h.
Referenced by SimActivityRegistry::connect(), RunManager::initializeUserActions(), SimActivityRegistry::watchBeginOfEvent(), SimActivityRegistry::watchBeginOfJob(), SimActivityRegistry::watchBeginOfRun(), SimActivityRegistry::watchBeginOfTrack(), SimActivityRegistry::watchDDDWorld(), SimActivityRegistry::watchEndOfEvent(), SimActivityRegistry::watchEndOfRun(), SimActivityRegistry::watchEndOfTrack(), and SimActivityRegistry::watchG4Step().
{ observers_.push_back(iObs); }
void sim_act::Signaler< T >::connect | ( | Observer< const T * > & | iObs | ) | [inline] |
does not take ownership of memory
Definition at line 65 of file Signaler.h.
{ observers_.push_back(&iObs); }
void sim_act::Signaler< T >::operator() | ( | const T * | iSignal | ) | const [inline] |
Definition at line 46 of file Signaler.h.
Referenced by sim_act::Signaler< EndOfTrack >::update().
{ typedef typename std::vector<Observer<const T*>* >::const_iterator iterator; for( iterator it = observers_.begin(); it != observers_.end(); ++it) { (*it)->slotForUpdate(iSignal); } }
const Signaler& sim_act::Signaler< T >::operator= | ( | const Signaler< T > & | ) | [private] |
void sim_act::Signaler< T >::update | ( | const T * | ) | [inline, private, virtual] |
This routine will be called when the appropriate signal arrives.
Implements Observer< const T * >.
Definition at line 74 of file Signaler.h.
{ this->operator()(iData); }
std::vector<Observer<const T*>* > sim_act::Signaler< T >::observers_ [private] |
Definition at line 78 of file Signaler.h.
Referenced by sim_act::Signaler< EndOfTrack >::connect(), and sim_act::Signaler< EndOfTrack >::operator()().