CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
sim_act::Signaler< T > Class Template Reference

#include <Signaler.h>

Inheritance diagram for sim_act::Signaler< T >:
Observer< const T *>

Public Types

typedef Observer< const T * > * slot_type
 

Public Member Functions

void connect (Observer< const T *> *iObs)
 does not take ownership of memory More...
 
void connect (Observer< const T *> &iObs)
 does not take ownership of memory More...
 
void operator() (const T *iSignal) const
 
const Signaleroperator= (const Signaler &)=delete
 
 Signaler ()
 
 Signaler (const Signaler &)=delete
 
 ~Signaler () override
 
- Public Member Functions inherited from Observer< const T *>
 Observer ()
 
void slotForUpdate (const T * iT)
 
virtual ~Observer ()
 

Private Member Functions

void update (const T *iData) override
 This routine will be called when the appropriate signal arrives. More...
 

Private Attributes

std::vector< Observer< const T * > * > observers_
 

Additional Inherited Members

Detailed Description

template<typename T>
class sim_act::Signaler< T >

Definition at line 36 of file Signaler.h.

Member Typedef Documentation

◆ slot_type

template<typename T>
typedef Observer<const T*>* sim_act::Signaler< T >::slot_type

Definition at line 38 of file Signaler.h.

Constructor & Destructor Documentation

◆ Signaler() [1/2]

template<typename T>
sim_act::Signaler< T >::Signaler ( )
inline

Definition at line 39 of file Signaler.h.

39 {}

◆ ~Signaler()

template<typename T>
sim_act::Signaler< T >::~Signaler ( )
inlineoverride

Definition at line 40 of file Signaler.h.

40 {}

◆ Signaler() [2/2]

template<typename T>
sim_act::Signaler< T >::Signaler ( const Signaler< T > &  )
delete

Member Function Documentation

◆ connect() [1/2]

template<typename T>
void sim_act::Signaler< T >::connect ( Observer< const T *> *  iObs)
inline

◆ connect() [2/2]

template<typename T>
void sim_act::Signaler< T >::connect ( Observer< const T *> &  iObs)
inline

does not take ownership of memory

Definition at line 58 of file Signaler.h.

Referenced by o2o_db_cfgmap.DbManagerDAQ::update_hashmap().

58 { observers_.push_back(&iObs); }
std::vector< Observer< const T * > * > observers_
Definition: Signaler.h:66

◆ operator()()

template<typename T>
void sim_act::Signaler< T >::operator() ( const T iSignal) const
inline

Definition at line 43 of file Signaler.h.

Referenced by sim_act::Signaler< EndOfTrack >::update().

43  {
44  typedef typename std::vector<Observer<const T*>*>::const_iterator iterator;
45  for (iterator it = observers_.begin(); it != observers_.end(); ++it) {
46  (*it)->slotForUpdate(iSignal);
47  }
48  }
std::vector< Observer< const T * > * > observers_
Definition: Signaler.h:66

◆ operator=()

template<typename T>
const Signaler& sim_act::Signaler< T >::operator= ( const Signaler< T > &  )
delete

◆ update()

template<typename T>
void sim_act::Signaler< T >::update ( const T )
inlineoverrideprivatevirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const T *>.

Definition at line 64 of file Signaler.h.

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), progressbar.ProgressBar::finish(), and MatrixUtil.Steps::overwrite().

64 { this->operator()(iData); }
void operator()(const T *iSignal) const
Definition: Signaler.h:43

Member Data Documentation

◆ observers_

template<typename T>
std::vector<Observer<const T*>*> sim_act::Signaler< T >::observers_
private