Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

CLocationEvent< T > Class Template Reference

#include <CLocationEvent.h>

Inheritance diagram for CLocationEvent< T >:

CEvent CRegisteredObject CNamedObject List of all members.

Public Member Functions

 CLocationEvent (volatile T *Location, CPointerPredicate< T > &pred)
 CLocationEvent (const char *pName, volatile T *Location, CPointerPredicate< T > &pred)
 CLocationEvent (const STD(string)&rName, volatile T *Location, CPointerPredicate< T > &pred)
 ~CLocationEvent ()
CLocationMonitor< T > & getMonitor ()
CLocationReactor< T > & getReactor ()
CPointerPredicate< T > & getPredicate ()
volatile T * getPointer ()
virtual void OnLocationChanged (T newValue)
virtual void OnTimeout ()
virtual STD (string) DescribeSelf()
template<class T>
 CLocationEvent (const string &rName, volatile T *Location, CPointerPredicate< T > &pred)

Protected Member Functions

virtual int operator() (int nargs, char **ppargs)

Private Member Functions

template<class U>
 CLocationEvent (const CLocationEvent< U > &rhs)
template<class U>
CLocationEventoperator= (const CLocationEvent< U > &rhs)
template<class U>
int operator== (const CLocationEvent< U > &rhs)

Private Attributes

CPointerPredicate< T > & m_rPredicate
CLocationMonitor< T > & m_rMonitor
 Monitor which polls for event.
CLocationReactor< T > & m_rReactor
 Reactor to the event when it fires.

Detailed Description

template<class T>
class CLocationEvent< T >

Encapsulates application level location monitor event processing. The CLocation event contains a special CLocationReactor which understands that it lives inside a CLocation event. It gathers typicallly needed information from the event monitor and passes it back to the location event's operator() member.

This class must be subclassed with operator() filled in. Note that information sufficent to start a location monitor is passed in at construction time.. this is an abstract,templated class.

Definition at line 332 of file CLocationEvent.h.


Constructor & Destructor Documentation

template<class T>
CLocationEvent< T >::CLocationEvent volatile T *  Location,
CPointerPredicate< T > &  pred
 

Constructor: Construct an anonymous location monitor event. To construct a location event requires:

Parameters:
Location - pointer to the monitored location
pred - Reference to the prediate which defines an eventworthy change in *Location.

Definition at line 364 of file CLocationEvent.cpp.

References CLocationEvent< T >::getMonitor(), CLocationEvent< T >::getReactor(), CLocationEvent< T >::m_rMonitor, CLocationEvent< T >::m_rPredicate, and CLocationEvent< T >::m_rReactor.

template<class T>
CLocationEvent< T >::CLocationEvent< T > const char *  pName,
volatile T *  Location,
CPointerPredicate< T > &  pred
 

Constructs a named location monitor event using a char* as the location monitor's name.

Parameters:
pName - Pointer to name of location monitor.
Location - Pointer to the name string.
pred - Reference to the predicate which defines an eventworthy change in *Location.

template<class T>
CLocationEvent< T >::CLocationEvent const STD(string)&  rName,
volatile T *  Location,
CPointerPredicate< T > &  pred
 

template<class T>
CLocationEvent< T >::~CLocationEvent< T >  ) 
 

Destructor:

template<class T>
template<class U>
CLocationEvent< T >::CLocationEvent const CLocationEvent< U > &  rhs  )  [private]
 

template<class T>
template<class T>
CLocationEvent< T >::CLocationEvent const string &  rName,
volatile T *  Location,
CPointerPredicate< T > &  pred
 

Constructs a CLocationEvent whose name is given by an STL String:

Parameters:
rName - Pointer to name of location monitor.
Location - Pointer to the name string.
pred - Reference to the predicate which defines an eventworthy change in *Location.


Member Function Documentation

template<class T>
CLocationMonitor<T>& CLocationEvent< T >::getMonitor  )  [inline]
 

< Allow monitor to be manipulated.

Reimplemented from CEvent.

Definition at line 384 of file CLocationEvent.h.

Referenced by CLocationEvent< T >::CLocationEvent().

template<class T>
volatile T* CLocationEvent< T >::getPointer  )  [inline]
 

Definition at line 393 of file CLocationEvent.h.

References CLocationEvent< T >::m_rMonitor.

template<class T>
CPointerPredicate<T>& CLocationEvent< T >::getPredicate  )  [inline]
 

< Allow predicate to be manipulated

Definition at line 390 of file CLocationEvent.h.

template<class T>
CLocationReactor<T>& CLocationEvent< T >::getReactor  )  [inline]
 

< Allow Reactor to be manipulated.

Reimplemented from CEvent.

Definition at line 387 of file CLocationEvent.h.

Referenced by CLocationEvent< T >::CLocationEvent().

template<class T>
void CLocationEvent< T >::OnLocationChanged newValue  )  [virtual]
 

Called whenever the predicate indicates that the location has changed in an event-worthy way. Default operation is a no-op. Normally, this class is subclassed and this member overridden.

Parameters:
newValue - New value of the monitored location.

Definition at line 426 of file CLocationEvent.cpp.

template<class T>
void CLocationEvent< T >::OnTimeout  )  [virtual]
 

Called whenever the monitor declared a timeout. The default implementation is a no-op. Normally this class is subclassed and if timeouts need to be responded to, this member is over-ridden.

Definition at line 435 of file CLocationEvent.cpp.

template<class T>
int CLocationEvent< T >::operator() int  nargs,
char **  ppargs
[protected, virtual]
 

Set nice value to allow others to execute and then call CEvent::operator()

Reimplemented from CEvent.

Definition at line 445 of file CLocationEvent.cpp.

References CEvent::operator()().

template<class T>
template<class U>
CLocationEvent& CLocationEvent< T >::operator= const CLocationEvent< U > &  rhs  )  [private]
 

template<class T>
template<class U>
int CLocationEvent< T >::operator== const CLocationEvent< U > &  rhs  )  [private]
 

template<class T>
virtual CLocationEvent< T >::STD string   )  [virtual]
 

The name of the object

Reimplemented from CEvent.


Member Data Documentation

template<class T>
CLocationMonitor<T>& CLocationEvent< T >::m_rMonitor [private]
 

Monitor which polls for event.

Reimplemented from CEvent.

Definition at line 336 of file CLocationEvent.h.

Referenced by CLocationEvent< T >::CLocationEvent(), and CLocationEvent< T >::getPointer().

template<class T>
CPointerPredicate<T>& CLocationEvent< T >::m_rPredicate [private]
 

Definition at line 335 of file CLocationEvent.h.

Referenced by CLocationEvent< T >::CLocationEvent().

template<class T>
CLocationReactor<T>& CLocationEvent< T >::m_rReactor [private]
 

Reactor to the event when it fires.

Reimplemented from CEvent.

Definition at line 337 of file CLocationEvent.h.

Referenced by CLocationEvent< T >::CLocationEvent().


The documentation for this class was generated from the following files:
Generated on Thu Jan 6 16:58:44 2005 for Spectrodaq External Event Framework by  doxygen 1.3.9.1