#include <dispatch.h>
Inheritance diagram for SigCX::Dispatcher:
Public Types | |
typedef SigC::Slot0< void > | Handler |
typedef unsigned long | HandlerID |
enum | Event { Timer, Read, Write, Except, Signal, All, Remove, Moved } |
Public Member Functions | |
Dispatcher () | |
virtual | ~Dispatcher () |
virtual HandlerID | add_input_handler (const Handler &h, int fd)=0 |
virtual HandlerID | add_output_handler (const Handler &h, int fd)=0 |
virtual HandlerID | add_exception_handler (const Handler &h, int fd)=0 |
virtual HandlerID | add_timeout_handler (const Handler &h, const TimeVal &tv)=0 |
HandlerID | add_timeout_handler_msec (const Handler &h, unsigned long tmout) |
virtual HandlerID | add_signal_handler (const Handler &h, int sig)=0 |
virtual void | remove (HandlerID id)=0 |
virtual bool | run (bool infinite=true)=0 |
virtual void | exit ()=0 |
virtual void | move (Dispatcher &d)=0 |
virtual bool | idle () const =0 |
This abstract class defines a generic interface to an event dispatcher.
|
Event handler.
|
|
Event handler ID.
|
|
Event types.
|
|
Constructor.
|
|
Destructor.
|
|
Add exception handler. The handler h is invoked when an exception occurs on fd.
Implemented in SigCX::StandardDispatcher, and SigCX::GtkDispatcher. |
|
Add input handler. The handler h is invoked when data is ready for reading from fd.
Implemented in SigCX::StandardDispatcher, and SigCX::GtkDispatcher. |
|
Add output handler. The handler h is invoked when fd is ready for writing.
Implemented in SigCX::StandardDispatcher, and SigCX::GtkDispatcher. |
|
Add signal handler. The handler h is invoked when the signal sig is received by the program. Implemented in SigCX::SignalDispatcher. |
|
Add timeout handler. The handler h is invoked when the time specified by tv has passed.
Implemented in SigCX::StandardDispatcher, and SigCX::GtkDispatcher. |
|
Add timeout handler. The handler h is invoked when the time specified by tv has passed.
|
|
Cause exit of event loop.
Implemented in SigCX::StandardDispatcher, and SigCX::GtkDispatcher. |
|
Get idle status.
Implemented in SigCX::StandardDispatcher, and SigCX::GtkDispatcher. |
|
Move all callbacks to another dispatcher.
Implemented in SigCX::StandardDispatcher, and SigCX::GtkDispatcher. |
|
Remove a handler.
Implemented in SigCX::SignalDispatcher, SigCX::StandardDispatcher, and SigCX::GtkDispatcher. |
|
Run the dispatcher. Run the dispatcher event loop, receiving events and calling the registered callbacks.
Implemented in SigCX::StandardDispatcher, and SigCX::GtkDispatcher. |