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

CLocationReactor< T > Class Template Reference

#include <CLocationReactor.h>

Inheritance diagram for CLocationReactor< T >:

CReactor CRegisteredObject CNamedObject List of all members.

Public Member Functions

 CLocationReactor ()
 CLocationReactor (const STD(string)&rName)
 CLocationReactor (const char *pName)
 ~CLocationReactor ()
 Destructor:.
template<class U>
int operator== (const CLocationReactor< U > &aCLocationReactor) const
 Operator== Equality Operator is allowed, but doesn't mean much.
virtual void OnEvent (CEventMonitor &rEvent)
virtual void OnLocationChanged (CLocationMonitor< T > &rEvent, T newValue)

Private Member Functions

 CLocationReactor (const CLocationReactor &aCLocationReactor)
 Copy Constructor is not allowed.
CLocationReactoroperator= (const CLocationReactor &aCLocationReactor)
 Operator= Assignment Operator is not allowed.

Detailed Description

template<class T>
class CLocationReactor< T >

Reacts to location monitor events. A location monitor monitors a Specific volatile object for various abstract conditions checked by a predicate. This is an abstract base class which must be derived for a particular applciation. The purpose of this class is to provide a branch in the Reactor class hierarchy from which Location Monitors can determine comptibility of the reactor. This class should be templated by the type used to template the monitor.

Definition at line 324 of file CLocationReactor.h.


Constructor & Destructor Documentation

template<class T>
CLocationReactor< T >::CLocationReactor  ) 
 

Default Constructor: Creates a reactor with an autoassigned name. There's currently no way to know by looking at the name that this is a Location Reactor

Definition at line 316 of file CLocationReactor.cpp.

References CNamedObject::AppendClassInfo().

template<class T>
CLocationReactor< T >::CLocationReactor const STD(string)&  rName  ) 
 

template<class T>
CLocationReactor< T >::CLocationReactor const char *  pName  ) 
 

Constructor given a name in ASCIZ format.

Parameters:
pName - pointer to the ASCIZ name of the object to create.

Definition at line 337 of file CLocationReactor.cpp.

References CNamedObject::AppendClassInfo().

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

Destructor:.

Definition at line 344 of file CLocationReactor.cpp.

template<class T>
CLocationReactor< T >::CLocationReactor const CLocationReactor< T > &  aCLocationReactor  )  [private]
 

Copy Constructor is not allowed.


Member Function Documentation

template<class T>
void CLocationReactor< T >::OnEvent CEventMonitor rEvent  )  [virtual]
 

Called when an event occurs. The base class is overriddent to dynamically cast the rEvent parameter to a CLocationMonitor<T> reference, and then get the value pointed to by the pointer. Once this is done, OnLocationChanged is called. THus users of this class typically will only need to derive and override OnLocationChanged.

Parameters:
rEvent - Reference to the CEventMonitor which was monitoring us.

Reimplemented from CReactor.

Definition at line 372 of file CLocationReactor.cpp.

References CLocationMonitor< T >::getLocation(), and CLocationReactor< T >::OnLocationChanged().

template<class T>
void CLocationReactor< T >::OnLocationChanged CLocationMonitor< T > &  rEvent,
newValue
[virtual]
 

Called when a location monitor detects a location change which satisfies its predicate. I expect that this Reactor will be used minimally by subclassing this class and overriding this function with application specific code.

Parameters:
rEvent - Reference to the location monitor which fired us.
newValue - New value at the location being monitored.

Definition at line 403 of file CLocationReactor.cpp.

Referenced by CLocationReactor< T >::OnEvent().

template<class T>
CLocationReactor& CLocationReactor< T >::operator= const CLocationReactor< T > &  aCLocationReactor  )  [private]
 

Operator= Assignment Operator is not allowed.

template<class T>
template<class U>
int CLocationReactor< T >::operator== const CLocationReactor< U > &  aCLocationReactor  )  const
 

Operator== Equality Operator is allowed, but doesn't mean much.

Definition at line 352 of file CLocationReactor.cpp.

References CReactor::operator==().


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