#include <EventManager.h>

Public Member Functions | |
| void | processEvents () |
| Processes all events that occured after the last call. | |
| void | registerListener (EventListener *newListener) |
| Registers a new listener. | |
| void | unregisterListener (EventListener *oldListener) |
| Unregisters a certain listener. | |
| virtual string | toString () const |
| Returns a textual representation. | |
| virtual string | className () const |
| Returns the class name of the object. | |
| virtual enum classId | classId () const |
| Returns the class id of the object. | |
Static Public Member Functions | |
| static EventManager * | getInstance () |
| Getter for configuration. | |
Private Member Functions | |
| EventManager () | |
| Constructor. | |
| ~EventManager () | |
| Destructor. | |
Private Attributes | |
| list< EventListener * > | listeners |
| All registered listeners. | |
| SDL_Event * | current |
| The current/last processed event. | |
| SDL_Joystick * | joystick |
| The joystick/gamepad if used. | |
Static Private Attributes | |
| static EventManager * | instance = 0 |
| The singleton instance. | |
The EventManager retrieves all SDL related events and delivers them to all interested components.
| EventManager::EventManager | ( | ) | [private] |
Constructor.
Standard constructor (only called once)
| EventManager::~EventManager | ( | ) | [private] |
Destructor.
Standard destructor (only called at program termination)
| EventManager * EventManager::getInstance | ( | ) | [static] |
Getter for configuration.
Creates the singleton instance if there isn't any.
| void EventManager::processEvents | ( | ) |
| void EventManager::registerListener | ( | EventListener * | newListener | ) |
Registers a new listener.
Will be ignored if the listener is already registered.
| newListener | The listener that shall be registered |
| void EventManager::unregisterListener | ( | EventListener * | oldListener | ) |
Unregisters a certain listener.
Will be ignored if the listener is not registered
| oldListener | The listener that shall be unregistered |
| string EventManager::toString | ( | ) | const [virtual] |
Returns a textual representation.
Reimplemented from Object.
| string EventManager::className | ( | ) | const [virtual] |
Returns the class name of the object.
Reimplemented from Object.
| enum classId EventManager::classId | ( | ) | const [virtual] |
EventManager * EventManager::instance = 0 [static, private] |
The singleton instance.
The sole instance of this object.
list<EventListener*> EventManager::listeners [private] |
All registered listeners.
SDL_Event* EventManager::current [private] |
The current/last processed event.
SDL_Joystick* EventManager::joystick [private] |
The joystick/gamepad if used.
1.5.6