CMS 3D CMS Logo

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 * >

List of all members.

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 Signaleroperator= (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_

Detailed Description

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

Definition at line 37 of file Signaler.h.


Member Typedef Documentation

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

Definition at line 41 of file Signaler.h.


Constructor & Destructor Documentation

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

Definition at line 42 of file Signaler.h.

{}
template<typename T>
virtual sim_act::Signaler< T >::~Signaler ( ) [inline, virtual]

Definition at line 43 of file Signaler.h.

{}
template<typename T>
sim_act::Signaler< T >::Signaler ( const Signaler< T > &  ) [private]

Member Function Documentation

template<typename T>
void sim_act::Signaler< T >::connect ( Observer< const T * > *  iObs) [inline]
template<typename T>
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);
         }
template<typename T>
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);
            }
         }
template<typename T>
const Signaler& sim_act::Signaler< T >::operator= ( const Signaler< T > &  ) [private]
template<typename T>
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);
         }

Member Data Documentation

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