#include <CReactor.h>
Inheritance diagram for CReactor:
Public Member Functions | |
CReactor () | |
CReactor (const STD(string)&rName) | |
CReactor (const char *pName) | |
virtual | ~CReactor () |
int | operator== (const CReactor &aCReactor) const |
virtual void | operator() (CEventMonitor &rMonitor, CEventMonitor::result Reason) |
virtual void | OnEvent (CEventMonitor &rMonitor) |
virtual void | OnError (CEventMonitor &rMonitor) |
virtual void | OnTimeout (CEventMonitor &rMonitor) |
Private Member Functions | |
CReactor (const CReactor &aCReactor) | |
For now copy construction is not allowed. | |
CReactor & | operator= (const CReactor &aCReactor) |
For now assignment is illegal. |
As a named object, CReactor's require a name on construction. The name is entered into the "Reactor" registry. As a convenience, a default constructor is supplied, however. If used the default constructor generates a name of the form Reactor_nnn where nnn is a unique number... from m_AutoIndex.
This base class provides: GetAutoName member function for derived classes which desire to implement this functionality as well.
Definition at line 331 of file CReactor.h.
|
Default constructor. A Reactor with name of the form Reactor_nnn is created. The reactor is entered in to the "Reactor" registry of the classified object registry returned from getCClassifiedObjectRegistry(). The name used is gaurenteed unique and can be queried via: getName(). Definition at line 326 of file CReactor.cpp. References CNamedObject::AppendClassInfo(), and RegistryName. |
|
|
|
Constructs a reactor given its name as an ASCIZ string:
Definition at line 359 of file CReactor.cpp. References CNamedObject::AppendClassInfo(), and RegistryName. |
|
For now copy construction is not allowed.
|
|
Destructor: Just ensure that we are removed from the Reactors registry before being destroyed. Definition at line 371 of file CReactor.cpp. References CApplicationRegistry::getInstance(), RegistryName, and CClassifiedObjectRegistry::Remove(). |
|
Called when the event monitor detects an error while waiting for an event. In general, this class is subclassed, and the actual code for OnError is supplied by the subclass. In order to support classes which may not care about event monitor errors themselves, we provide an empty implementation of this function, preventing us from being an ABC.
Definition at line 452 of file CReactor.cpp. Referenced by operator()(). |
|
Called when the event occurs. This is called from operator(). In general, this class is subclassed, and the actual code for OnEvent is supplied by the subclass. In order to support classes which may not care about the event themselves, we provide an empty implementation of this function, preventing us from being an ABC.
Reimplemented in CBufferReactor< T >, CFdReactor, CLocationReactor< T >, CTimerEvent::CTimerGenericReactor, CBufferReactor< U >, and CLocationReactor< U >. Definition at line 438 of file CReactor.cpp. Referenced by operator()(). |
|
Called when an event monitor detects a timeout while waiting for the event. In general, this class is subclassed, and the actual code for OnTimeout is supplied by the subclass. In order to support classes which may not care about event monitor timeouts themselves, we provide an empty implementation of this function, preventing us from being an ABC.
Reimplemented in CBufferEvent< T >::CGenericBufferReactor< U >, CFileEvent::CFileEventReactor, CLocationEvent< T >::CGenericLocationReactor< U >, and CBufferEvent< T >::CGenericBufferReactor< T >. Definition at line 466 of file CReactor.cpp. Referenced by operator()(). |
|
Operation Type: Interface Definition Purpose: This method is called in response ot an event from an event monitor on which this reactor has been established. The Reactor provides application specific procesing of the event.
Definition at line 409 of file CReactor.cpp. References OnError(), OnEvent(), and OnTimeout(). |
|
For now assignment is illegal.
|
|
Definition at line 379 of file CReactor.cpp. References CRegisteredObject::operator==(). Referenced by CLocationReactor< T >::operator==(), CFdReactor::operator==(), and CBufferReactor< T >::operator==(). |