List of all members.
Detailed Description
Stores a list of Listener objects and broadcasts events to them.
The Broadcaster class is intended to be inherited from. It maintains a list of Listener objects to which it broadcasts messages in the form of Event objects. In its base form, the Broadcaster will transmit basic input Event messages, in particular keyboard and mouse input as well as important system messages like application Quit events and such.
- Todo:
- Complete the description of how to properly work with a Broadcaster.
Constructor & Destructor Documentation
| Broadcaster::Broadcaster |
( |
|
) |
|
| Broadcaster::~Broadcaster |
( |
|
) |
[virtual] |
Member Function Documentation
| void Broadcaster::addEvent |
( |
Event * |
event |
) |
[protected] |
Adds an event to the back of the Event list.
- Parameters:
-
| event | A pointer to an Event. Must not be NULL. |
| void Broadcaster::addListener |
( |
Listener * |
listener |
) |
|
Adds a listener to internal list.
- Todo:
- Verify that the find function works properly.
| int Broadcaster::getQueSize |
( |
|
) |
[inline] |
Returns the number of Events currently in the Event Que.
| virtual void Broadcaster::handleEvent |
( |
|
) |
[inline, private, virtual] |
This function is called during the Pump cycle before Listeners are notified of events.
This event is useful if you have a Broadcaster that needs to handle events before Listeners are notified of events.
Reimplemented in SystemEventHandler.
| void Broadcaster::notify |
( |
|
) |
|
Notifies any listeners of events that are in the queue.
- Todo:
- This function is sloppy. Let's clean it up.
| void Broadcaster::pump |
( |
|
) |
|
Pumps the event handling cycle and notifies any listeners if any events occur.
| void Broadcaster::removeEvent |
( |
|
) |
[protected] |
Removes an event from the front of the Event list.
| void Broadcaster::removeListener |
( |
Listener * |
listener |
) |
|
Member Data Documentation
The documentation for this class was generated from the following files: