#include <GlibMultiplexer.hpp>
Inheritance diagram for Ionflux::Tools::GlibMultiplexer:
Public Member Functions | |
GlibMultiplexer () | |
Constructor. | |
GlibMultiplexer (int initArgc, char **initArgv) | |
Constructor. | |
GlibMultiplexer (int initArgc, char **initArgv, Gtk::Window *initMainWin) | |
Constructor. | |
virtual | ~GlibMultiplexer () |
Destructor. | |
virtual void | registerEvent (IOHandler *handler, IOEvent event) |
Register IO event. | |
virtual void | removeEvent (IOHandler *handler, IOEvent event) |
Remove IO event. | |
virtual bool | processEvent (GlibIOEventInfo *eventInfo, Glib::IOCondition ioCond) |
Process IO event. | |
virtual void | run () |
Main loop. | |
virtual void | quit () |
Exit main loop. | |
virtual bool | isRunning () |
Get running state. | |
virtual void | runHandler () |
Run handler. | |
virtual bool | quitHandler () |
Quit handler. | |
virtual Reporter & | getLog () |
Get Console output/logging facility. | |
virtual void | setMainWindow (Gtk::Window *newMainWindow) |
Set application main window. | |
virtual Gtk::Window * | getMainWindow () |
Get application main window. | |
Static Public Member Functions | |
static void | shutdownHandler (int signum) |
Shutdown handler. | |
Protected Member Functions | |
virtual void | clearEvent (GlibIOEventInfo *eventInfo) |
Clear IO event. | |
virtual void | clearEvents () |
Clear IO events. | |
virtual void | addEvent (GlibIOEventInfo *eventInfo) |
Add IO event. | |
virtual void | addEvents () |
Add IO events. | |
Protected Attributes | |
Ionflux::Tools::Reporter | log |
Console output/logging. | |
std::vector< GlibIOEventInfo * > | events |
Vector of registered IO events. | |
std::vector< GlibIOEventInfo * > | trash |
Vector of IO events to be removed. | |
std::vector< GlibIOEventInfo * > | newEvents |
Vector of IO events to be added. | |
bool | running |
Main loop flag. | |
Gtk::Main * | kit |
Gtk Main object. | |
int | argc |
Argument count. | |
char ** | argv |
Argument vector. | |
Gtk::Window * | mainWindow |
Application main window. | |
Static Protected Attributes | |
static sig_atomic_t | shutdown = 0 |
Shutdown flag. |
A multiplexer for IO events. If a specified event is ready to be processed, the IO multiplexer notifies the associated IO handler. For example, an IOHandler may be called if a file descriptor is ready for reading.
To register an event, you set a file descriptor and a mask of event types which the IO handler should be notified of. You then call IOMultiplexer::registerEvent() with a pointer to an IOHandler and the event object. To remove (unregister) an event, call IOMultiplexer::removeEvent() with the same handler and event object.
|
Constructor. Construct new GlibMultiplexer object. |
|
Constructor. Construct new GlibMultiplexer object.
|
|
Constructor. Construct new GlibMultiplexer object.
|
|
Destructor. Destruct GlibMultiplexer object. |
|
Add IO event. Adds an event to the vector of registered events.
|
|
Add IO events. Adds events flagged for addition to the vector of registered events. |
|
Clear IO event. Removes an event from the vector of registered events.
|
|
Clear IO events. Removes events flagged for removal from from the vector of registered events. |
|
Get Console output/logging facility. The console output/logging facility used by this object Implements Ionflux::Tools::IOMultiplexer. |
|
Get application main window. return Current value of application main window. |
|
Get running state.
Implements Ionflux::Tools::IOMultiplexer. |
|
Process IO event. Processes the event referenced by the specified IO event record.
|
|
Exit main loop. Call this function to exit from the main loop. Implements Ionflux::Tools::IOMultiplexer. |
|
Quit handler. Event handler for 'quit' signals.
|
|
Register IO event. Register an IO event to be handled by the multiplexer.
Implements Ionflux::Tools::IOMultiplexer. |
|
Remove IO event. Remove an IO event from the set of events handled by the multiplexer.
Implements Ionflux::Tools::IOMultiplexer. |
|
Main loop. Start the main loop to watch for registered events. Implements Ionflux::Tools::IOMultiplexer. |
|
Run handler. Event handler for 'run' signals.
|
|
Set application main window. Set new value of application main window.
|
|
Shutdown handler. Signal handler for signals that will cause the main loop to exit.
Reimplemented from Ionflux::Tools::IOMultiplexer. |
|
Argument count.
|
|
Argument vector.
|
|
Vector of registered IO events.
|
|
Gtk Main object.
|
|
Console output/logging.
|
|
Application main window.
|
|
Vector of IO events to be added.
|
|
Main loop flag.
|
|
Shutdown flag.
|
|
Vector of IO events to be removed.
|