|
gloox
1.0
|
#include <eventdispatcher.h>
Public Member Functions | |
| EventDispatcher () | |
| virtual | ~EventDispatcher () |
| void | dispatch (const Event &event, const std::string &context, bool remove) |
| void | dispatch (const Event &event) |
| void | registerEventHandler (EventHandler *eh, const std::string &context) |
| void | removeEventHandler (EventHandler *eh) |
| EventDispatcher | ( | ) |
Creates a new EventDispatcher object. You should not need to use this class directly.
Definition at line 20 of file eventdispatcher.cpp.
|
virtual |
Virtual Destructor.
Definition at line 24 of file eventdispatcher.cpp.
| void dispatch | ( | const Event & | event, |
| const std::string & | context, | ||
| bool | remove | ||
| ) |
Looks for handlers for the given Event, and removes the handlers if requested.
| event | The Event to dispatch. |
| context | An identifier that limits the EventHandlers that will get notified to those that are specifically interested in this context. |
| remove | Whether or not to remove the context from the list of known contexts. Useful for IQ IDs. |
Definition at line 28 of file eventdispatcher.cpp.
| void dispatch | ( | const Event & | event | ) |
Looks for handlers for the given Event, identified by its type.
| event | The event to dispatch. |
Definition at line 43 of file eventdispatcher.cpp.
| void registerEventHandler | ( | EventHandler * | eh, |
| const std::string & | context | ||
| ) |
Registers the given EventHandler to be notified about Events with the given context. The context will usually be an IQ ID.
| eh | The EventHandler to register. |
| context | The context to register the EventHandler for. |
Definition at line 53 of file eventdispatcher.cpp.
| void removeEventHandler | ( | EventHandler * | eh | ) |
Removes the given EventHandler.
| eh | The EventHandler to remove. |
Definition at line 61 of file eventdispatcher.cpp.
1.8.1.2