Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | Directories | Class Members | Related Pages

SigCX::StandardDispatcher Class Reference
[SigC++ Extras]

StandardDispatcher class. More...

#include <dispatch.h>

Inheritance diagram for SigCX::StandardDispatcher:

SigCX::SignalDispatcher SigCX::Dispatcher List of all members.

Public Member Functions

 StandardDispatcher ()
virtual ~StandardDispatcher ()
virtual HandlerID add_input_handler (const Handler &h, int fd)
virtual HandlerID add_output_handler (const Handler &h, int fd)
virtual HandlerID add_exception_handler (const Handler &h, int fd)
virtual HandlerID add_timeout_handler (const Handler &h, const TimeVal &tv)
virtual void remove (HandlerID id)
virtual bool run (bool infinite=true)
virtual void exit ()
virtual void move (Dispatcher &d)
virtual bool idle () const

Detailed Description

StandardDispatcher class.

This class implements a event dispatcher on top of the standard UNIX select() function.


Constructor & Destructor Documentation

SigCX::StandardDispatcher::StandardDispatcher  ) 
 

Constructor.

virtual SigCX::StandardDispatcher::~StandardDispatcher  )  [virtual]
 

Destructor.


Member Function Documentation

virtual HandlerID SigCX::StandardDispatcher::add_exception_handler const Handler h,
int  fd
[virtual]
 

Add exception handler.

The handler h is invoked when an exception occurs on fd.

Parameters:
h The input handler.
fd File descriptor.

Implements SigCX::Dispatcher.

virtual HandlerID SigCX::StandardDispatcher::add_input_handler const Handler h,
int  fd
[virtual]
 

Add input handler.

The handler h is invoked when data is ready for reading from fd.

Parameters:
h The input handler.
fd File descriptor.

Implements SigCX::Dispatcher.

virtual HandlerID SigCX::StandardDispatcher::add_output_handler const Handler h,
int  fd
[virtual]
 

Add output handler.

The handler h is invoked when fd is ready for writing.

Parameters:
h The input handler.
fd File descriptor.

Implements SigCX::Dispatcher.

virtual HandlerID SigCX::StandardDispatcher::add_timeout_handler const Handler h,
const TimeVal tv
[virtual]
 

Add timeout handler.

The handler h is invoked when the time specified by tv has passed.

Parameters:
h The input handler.
tv TimeVal timeout.

Implements SigCX::Dispatcher.

virtual void SigCX::StandardDispatcher::exit  )  [virtual]
 

Cause exit of event loop.

Implements SigCX::Dispatcher.

virtual bool SigCX::StandardDispatcher::idle  )  const [virtual]
 

Get idle status.

Returns:
true if the dispatcher is idle.

Implements SigCX::Dispatcher.

virtual void SigCX::StandardDispatcher::move Dispatcher d  )  [virtual]
 

Move all callbacks to another dispatcher.

Parameters:
d The dispatcher to move the callbacks to.

Implements SigCX::Dispatcher.

virtual void SigCX::StandardDispatcher::remove HandlerID  id  )  [virtual]
 

Remove a handler.

Parameters:
id The ID of the handler.

Reimplemented from SigCX::SignalDispatcher.

virtual bool SigCX::StandardDispatcher::run bool  infinite = true  )  [virtual]
 

Run the dispatcher.

Run the dispatcher event loop, receiving events and calling the registered callbacks.

Parameters:
infinite If false, run only one iteration, else run until exit() is called on this dispatcher instance.
Returns:
true if exit() was called.

Implements SigCX::Dispatcher.


The documentation for this class was generated from the following file:
Generated on Sun Apr 10 18:35:43 2005 for SigCX - SigC++ Extras by  doxygen 1.4.2