#include <IEventQueue.h>
Inherits IInterface.
Inherited by CEventQueue.
Inheritance diagram for IEventQueue:
accessors | |
virtual bool | isEmpty () const =0 |
Test if queue is empty. | |
virtual IEventJob * | getHandler (CEvent::Type type, void *target) const =0 |
Get an event handler. | |
virtual const char * | getTypeName (CEvent::Type type)=0 |
Get name for event. | |
void * | getSystemTarget () |
Get the system event type target. | |
IEventQueue * | getInstance () |
Get the singleton instance. | |
Public Member Functions | |
manipulators | |
virtual void | adoptBuffer (IEventQueueBuffer *)=0 |
Set the buffer. | |
virtual bool | getEvent (CEvent &event, double timeout=-1.0)=0 |
Remove event from queue. | |
virtual bool | dispatchEvent (const CEvent &event)=0 |
Dispatch an event. | |
virtual void | addEvent (const CEvent &event)=0 |
Add event to queue. | |
virtual CEventQueueTimer * | newTimer (double duration, void *target)=0 |
Create a recurring timer. | |
virtual CEventQueueTimer * | newOneShotTimer (double duration, void *target)=0 |
Create a one-shot timer. | |
virtual void | deleteTimer (CEventQueueTimer *)=0 |
Destroy a timer. | |
virtual void | adoptHandler (CEvent::Type type, void *target, IEventJob *handler)=0 |
Register an event handler for an event type. | |
virtual void | removeHandler (CEvent::Type type, void *target)=0 |
Unregister an event handler for an event type. | |
virtual void | removeHandlers (void *target)=0 |
Unregister all event handlers for an event target. | |
virtual CEvent::Type | registerType (const char *name)=0 |
Creates a new event type. | |
virtual CEvent::Type | registerTypeOnce (CEvent::Type &type, const char *name)=0 |
Creates a new event type. | |
Static Protected Member Functions | |
manipulators | |
void | setInstance (IEventQueue *) |
Set the singleton instance. |
An event queue provides a queue of CEvents. Clients can block waiting on any event becoming available at the head of the queue and can place new events at the end of the queue. Clients can also add and remove timers which generate events periodically.
Definition at line 37 of file IEventQueue.h.
|
Add event to queue.
Adds Implemented in CEventQueue. |
|
Set the buffer. Replace the current event queue buffer. Any queued events are discarded. The queue takes ownership of the buffer. Implemented in CEventQueue. |
|
Register an event handler for an event type.
Registers an event handler for Implemented in CEventQueue. |
|
Destroy a timer. Destroys a previously created timer. The timer is removed from the queue and will not generate event, even if the timer has expired. Implemented in CEventQueue. |
|
Dispatch an event. Looks up the dispatcher for the event's target and invokes it. Returns true iff a dispatcher exists for the target. Implemented in CEventQueue. |
|
Remove event from queue.
Returns the next event on the queue into Implemented in CEventQueue. |
|
Get an event handler.
Finds and returns the event handler for the Implemented in CEventQueue. |
|
Get the singleton instance. Returns the singleton instance of the event queue Definition at line 32 of file IEventQueue.cpp. |
|
Get the system event type target.
Returns the target to use for dispatching Definition at line 25 of file IEventQueue.cpp. |
|
Get name for event.
Returns the name for the event Implemented in CEventQueue. |
|
Test if queue is empty. Returns true iff the queue has no events in it, including timer events. Implemented in CEventQueue. |
|
Create a one-shot timer.
Creates and returns a one-shot timer. An event is returned when the timer expires and the timer is removed from further handling. When a timer event is returned the data points to a Implemented in CEventQueue. |
|
Create a recurring timer.
Creates and returns a timer. An event is returned after
Events for a single timer don't accumulate in the queue, even if the client reading events can't keep up. Instead, the Implemented in CEventQueue. |
|
Creates a new event type. Returns a unique event type id. Implemented in CEventQueue. |
|
Creates a new event type.
If Implemented in CEventQueue. |
|
Unregister an event handler for an event type.
Unregisters an event handler for the Implemented in CEventQueue. |
|
Unregister all event handlers for an event target.
Unregisters all event handlers for the Implemented in CEventQueue. |
|
Set the singleton instance. Sets the singleton instance of the event queue Definition at line 39 of file IEventQueue.cpp. |