csEventQueue Class Reference
This class represents a general event queue. More...
#include <csutil/cseventq.h>
Inheritance diagram for csEventQueue:

Public Member Functions | |
virtual void | Clear () |
Clear event queue. | |
uint32 | CountPool () |
Get a count of events in the pool, for testing only. | |
virtual csPtr< iEvent > | CreateBroadcastEvent (const csEventID &name) |
Create an event with the broadcast flag set. | |
virtual csPtr< iEvent > | CreateEvent (const csEventID &name) |
Create an event, from the pool if there are any free events available. | |
virtual csPtr< iEvent > | CreateEvent () |
Grab an event from the pool or make a new one if it's empty. | |
virtual csPtr< iEventOutlet > | CreateEventOutlet (iEventPlug *) |
Register an event plug and return a new outlet. | |
csEventQueue (iObjectRegistry *, size_t iLength=DEF_EVENT_QUEUE_LENGTH) | |
Initialize the event queue. | |
virtual void | Dispatch (iEvent &) |
Dispatch a single event from the queue; normally called by Process (). | |
virtual csPtr< iEvent > | Get () |
Get next event from queue or a null references if no event. | |
virtual iEventCord * | GetEventCord (const csEventID &) |
Get the event cord for a given category and subcategory. | |
virtual iEventOutlet * | GetEventOutlet () |
Get a public event outlet for posting just an event. | |
virtual bool | IsEmpty () |
Query if queue is empty (@@ Not thread safe!). | |
virtual void | Post (iEvent *) |
Place an event into queue. | |
virtual void | Process () |
Process the event queue. Calls Dispatch () once for each contained event. | |
virtual csHandlerID | RegisterListener (iEventHandler *handler, const csEventID events[]) |
Shorthand for RegisterListener() followed by Subscribe(). | |
virtual csHandlerID | RegisterListener (iEventHandler *handler, const csEventID &event) |
Shorthand for RegisterListener() followed by Subscribe(). | |
virtual csHandlerID | RegisterListener (iEventHandler *) |
Make the event scheduler subsystem aware of an event handler. | |
virtual void | RemoveAllListeners () |
Remove all listeners from the queue. | |
virtual void | RemoveListener (iEventHandler *) |
Remove a given listener from the event queue. | |
virtual bool | Subscribe (iEventHandler *, const csEventID[]) |
Subscribe a listener to a set of event subtrees. | |
virtual bool | Subscribe (iEventHandler *, const csEventID &) |
Subscribe a listener to an event subtree. | |
virtual void | Unsubscribe (iEventHandler *, const csEventID[]) |
Unsubscribe a listener from a set of event subtrees. | |
virtual void | Unsubscribe (iEventHandler *, const csEventID &) |
Unsubscribe a listener from an event subtree. | |
virtual | ~csEventQueue () |
Destroy an event queue object. | |
Public Attributes | |
csEventID | FinalProcess |
csEventID | Frame |
csEventID | PostProcess |
csEventID | PreProcess |
csEventID | ProcessEvent |
Friends | |
class | csEventOutlet |
class | csEventTree |
class | csPoolEvent |
Classes | |
class | FinalProcessFrameEventDispatcher |
struct | iTypedFrameEventDispatcher |
As a transitional measure, the csevPreProcess, csevProcess, csevPostProcess and csevFinalProcess events are actually sub-events dispatched by a csevFrame handler. More... | |
class | PostProcessFrameEventDispatcher |
class | PreProcessFrameEventDispatcher |
class | ProcessFrameEventDispatcher |
Detailed Description
This class represents a general event queue.See the documentation of iEventQueue for a detailed description of each method. One instance of this class is usually shared via iObjectRegistry. Event queues are thread-safe.
Definition at line 68 of file cseventq.h.
Constructor & Destructor Documentation
|
Initialize the event queue.
|
|
Destroy an event queue object.
|
Member Function Documentation
|
Clear event queue.
Implements iEventQueue. |
|
Get a count of events in the pool, for testing only.
|
|
Create an event with the broadcast flag set. Draw from the pool if any are available, else create a new event in the pool and use it. Implements iEventQueue. |
|
Create an event, from the pool if there are any free events available. Else create a new event in the pool and use it. Implements iEventQueue. |
|
Grab an event from the pool or make a new one if it's empty.
|
|
Register an event plug and return a new outlet.
Implements iEventQueue. |
|
Dispatch a single event from the queue; normally called by Process ().
Implements iEventQueue. |
|
Get next event from queue or a null references if no event.
Implements iEventQueue. |
|
Get the event cord for a given category and subcategory.
Implements iEventQueue. |
|
Get a public event outlet for posting just an event.
Implements iEventQueue. |
|
Query if queue is empty (@@ Not thread safe!).
Implements iEventQueue. Definition at line 225 of file cseventq.h. |
|
Place an event into queue.
Implements iEventQueue. |
|
Process the event queue. Calls Dispatch () once for each contained event.
Implements iEventQueue. |
|
Shorthand for RegisterListener() followed by Subscribe().
Implements iEventQueue. Definition at line 149 of file cseventq.h. References CS_HANDLER_INVALID, and csEventTree::Subscribe(). |
|
Shorthand for RegisterListener() followed by Subscribe().
Implements iEventQueue. Definition at line 135 of file cseventq.h. References CS_HANDLER_INVALID, and csEventTree::Subscribe(). |
|
Make the event scheduler subsystem aware of an event handler.
Implements iEventQueue. |
|
Remove all listeners from the queue. Unregister all listeners.
Implements iEventQueue. |
|
Remove a given listener from the event queue. Removes all subscriptions. It is VERY important that this be called before deleting the event handler! Implements iEventQueue. |
|
Subscribe a listener to a set of event subtrees. The event subtrees should be disjoint, i.e., no event name should be a prefix of another.
Implements iEventQueue. |
|
Subscribe a listener to an event subtree. Thinly wraps csEventTree::Subscribe
Implements iEventQueue. |
|
Unsubscribe a listener from a set of event subtrees.
Implements iEventQueue. |
|
Unsubscribe a listener from an event subtree. Thinly wraps csEventTree::Unsubscribe
Implements iEventQueue. |
The documentation for this class was generated from the following file:
- csutil/cseventq.h
Generated for Crystal Space by doxygen 1.4.6