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

CFdReactor Class Reference

#include <CFdReactor.h>

Inheritance diagram for CFdReactor:

CReactor CRegisteredObject CNamedObject CFileEvent::CFileEventReactor List of all members.

Public Member Functions

 CFdReactor ()
 CFdReactor (const char *pName)
 CFdReactor (const STD(string)&rName)
virtual ~CFdReactor ()
int operator== (const CFdReactor &aCFdReactor) const
 Operator== Equality Operator.
virtual void OnEvent (CEventMonitor &rMonitor)
virtual void OnReadable (CFdMonitor &rMonitor, int fd)
virtual void OnWritable (CFdMonitor &rMonitor, int fd)
virtual void OnException (CFdMonitor &rMonitor, int fd)

Private Member Functions

 CFdReactor (const CFdReactor &aCFdReactor)
 Copy construction is prohibited.
CFdReactoroperator= (const CFdReactor &aCFdReactor)
 Operator= Assignment Operator - Prohibited.

Detailed Description

Base class for file descriptor reactors: Fd reactors react to events on a file descriptor. This abstract base class must be subclassed by the programmer to provide application specific behavior.

Definition at line 317 of file CFdReactor.h.


Constructor & Destructor Documentation

CFdReactor::CFdReactor  ) 
 

Default constructor: Creates a file descriptor reactor which autonamed. Such fd reactors in general are not named in a memorable way.

Definition at line 306 of file CFdReactor.cpp.

References CNamedObject::AppendClassInfo().

CFdReactor::CFdReactor const char *  pName  ) 
 

Constructor for a named reactor. Creates a file descriptor reactor which is given a memorable name by the object's client.

Parameters:
pName -Pointer to object name in ASCIZ form.

Definition at line 316 of file CFdReactor.cpp.

References CNamedObject::AppendClassInfo().

CFdReactor::CFdReactor const STD(string)&  rName  ) 
 

CFdReactor::CFdReactor const CFdReactor aCFdReactor  )  [private]
 

Copy construction is prohibited.

CFdReactor::~CFdReactor  )  [virtual]
 

Definition at line 333 of file CFdReactor.cpp.


Member Function Documentation

void CFdReactor::OnEvent CEventMonitor rMonitor  )  [virtual]
 

EDispatches an incomming event from an FdMonitor to one or more of the following member functions:

  • OnReadble - The file is readable.
  • OnWritable - The file is writable.
  • OnException - The file has an exceptional condition.

NOTE: We can only dispatch to conditions the monitor is looking for.

Throws:

  • CIncompatibleMonitorException - If the monitor cannot be cast to a CFdMonitor object.

Parameters:
rMonitor - Reference to the monitor which caused us to be invoked. This should be an object which lives in the CFdMonitor branch of the CMonitor class hierarchy.

Reimplemented from CReactor.

Definition at line 363 of file CFdReactor.cpp.

References CFdMonitor::getFd(), CFdMonitor::getLastEventMask(), OnException(), OnReadable(), and OnWritable().

void CFdReactor::OnException CFdMonitor rMonitor,
int  fd
[virtual]
 

Called when the file associated with the event monitor has an "exceptional condition".. Actual use of this Reactor involves subclassing the monitor and overriding OnException if you care about processing exceptional conditions.

Reimplemented in CFileEvent::CFileEventReactor.

Definition at line 415 of file CFdReactor.cpp.

Referenced by OnEvent().

void CFdReactor::OnReadable CFdMonitor rMonitor,
int  fd
[virtual]
 

Called when the file associated with the event monitor becomes readable. Actual use of this Reactor involves subclassing the monitor and overriding OnReadable if you care about reading the file.

Reimplemented in CFileEvent::CFileEventReactor.

Definition at line 395 of file CFdReactor.cpp.

Referenced by OnEvent().

void CFdReactor::OnWritable CFdMonitor rMonitor,
int  fd
[virtual]
 

Called when the file associated with the event monitor becomes writable. Actual use of this Reactor involves subclassing the monitor and overriding OnWritable if you care about writing the file.

Reimplemented in CFileEvent::CFileEventReactor.

Definition at line 405 of file CFdReactor.cpp.

Referenced by OnEvent().

CFdReactor& CFdReactor::operator= const CFdReactor aCFdReactor  )  [private]
 

Operator= Assignment Operator - Prohibited.

int CFdReactor::operator== const CFdReactor aCFdReactor  )  const
 

Operator== Equality Operator.

Definition at line 338 of file CFdReactor.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