#include <UniEvent/SimpleDispatcher.h>
Inheritance diagram for strmod::unievent::SimpleDispatcher:

Public Methods | |
| SimpleDispatcher () | |
| Create one. | |
| virtual | ~SimpleDispatcher () |
| Destroy one. | |
| virtual int | AreYouA (const lcore::ClassIdent &cid) const |
| Asks if a class is of a particular type, or publicly derived from that type. | |
| virtual void | addEvent (const EventPtr &ev) |
| Add an event to the queue. | |
| virtual void | dispatchEvents (unsigned int numevents, Dispatcher *enclosing=0) |
| Dispatch until a certain number of events have been dispatched, or the queue is empty. | |
| virtual void | dispatchUntilEmpty (Dispatcher *enclosing=0) |
| Dispatch until the queue is empty. | |
| virtual void | stopDispatching () |
| Cause the multiple event dispatch methods to halt before they normally would. | |
| virtual void | interrupt () |
| Interrupts the dispatcher to execute a high priority event. | |
| virtual bool | isQueueEmpty () const |
| Does the queue have any events in it? | |
| virtual void | addBusyPollEvent (const EventPtr &ev) |
| Add an event that will be posted to poll something if the queue is busy. | |
| virtual bool | onQueueEmpty (const EventPtr &ev) |
| This event is only triggered whenever an event dispatch is attempted when there's an empty queue. | |
| virtual bool | onInterrupt (const EventPtr &ev) |
| This event is only triggered when interrupt() is called. | |
Static Public Attributes | |
| const UNEVT_ClassIdent | identifier |
| Globally unique identifier for this class. | |
Protected Methods | |
| virtual const lcore::ClassIdent * | i_GetIdent () const |
| Returns the class identifier for the class the object actually is. | |
Definition at line 41 of file SimpleDispatcher.h.
|
|
Add an event that will be posted to poll something if the queue is busy. The Dispatcher maintains the concept of external and internal events. External events are those posted by the addEvent function. Internal events are those posted in response to some internal condition. When external events cause other external events to be added, busy loops can take over the system. In order to prevent this, an event from this queue will be posted if the queue contains only external events. Events in this queue should query some outside event source for events and use addEvent to add any there may be. Under no circumstance should one of these events always cause events to be added through addEvent. Doing this would just propogate the bad busy loop behavior. Implements strmod::unievent::Dispatcher. Definition at line 135 of file SimpleDispatcherImp.cxx. |
|
|
Asks if a class is of a particular type, or publicly derived from that type. Overriden in every derived class (with a static identifier member) to compare against the identifier, then call the AreYouA methods of all the superclasses.
Reimplemented from strmod::unievent::Dispatcher. Definition at line 88 of file SimpleDispatcher.h. |
|
|
Returns the class identifier for the class the object actually is. Should always be overridden in any class that has a static identifier member. Reimplemented from strmod::unievent::Dispatcher. Definition at line 68 of file SimpleDispatcher.h. |
|
|
Interrupts the dispatcher to execute a high priority event. This sets a flag so that as soon as the Dispatcher's event loop gets control, the event set by onInterrupt() will be put on the front of the queue. It will also call the Event::interrupt() method of any currently executing event.
Implements strmod::unievent::Dispatcher. Definition at line 353 of file SimpleDispatcherImp.cxx. |
|
|
This event is only triggered when interrupt() is called. When interrupt() is called, a flag is set so this event is put onto the front of the queue as soon as the Dispatcher's event loop gets control again.
Implements strmod::unievent::Dispatcher. Definition at line 337 of file SimpleDispatcherImp.cxx. |
|
|
This event is only triggered whenever an event dispatch is attempted when there's an empty queue.
Implements strmod::unievent::Dispatcher. Definition at line 324 of file SimpleDispatcherImp.cxx. |
|
|
Globally unique identifier for this class. Every class that might need to be identified should have a public static const identifier object in it. Reimplemented from strmod::unievent::Dispatcher. |
1.3-rc1