#include <eventmanager.h>
Public Member Functions | |
| EventManager () | |
| ~EventManager () | |
| void | AddTimeEvent (std::string name, int time, int duration=0) |
| void | AddEvent (std::string name) |
| void | AddListener (EventListener *listener) |
| void | RemoveListener (EventListener *listener) |
| bool | Update () |
| void | ClearEvents () |
| void | ClearListeners () |
Protected Attributes | |
| int | m_time |
| int | m_frames |
| std::list< EventListener * > | m_listeners |
| std::list< EventListener * >::iterator | m_iterl |
| std::list< Event * > | m_events |
| std::list< Event * >::iterator | m_itere |
| EventManager::EventManager | ( | ) |
| EventManager::~EventManager | ( | ) |
| void EventManager::AddTimeEvent | ( | std::string | name, | |
| int | time, | |||
| int | duration = 0 | |||
| ) |
A function that adds an event
| name | the string that is given to the listeners function | |
| time | the time when the event should start. relative to now. | |
| duration | the time that should pass by since the event started to call the listeners function |
| void EventManager::AddEvent | ( | std::string | name | ) |
A function that adds an event that imidiatly call the listener functions
| name | the string that is given to the listeners function |
| void EventManager::AddListener | ( | EventListener * | listener | ) |
A function that adds a listener
| listener | a pointer to a listener, that is to be added |
| void EventManager::RemoveListener | ( | EventListener * | listener | ) |
A function that removes a listener
| listener | a pointer to a listener, that is to be removed |
| bool EventManager::Update | ( | ) |
A function that updates the Manager. Do the managers job etc
| void EventManager::ClearEvents | ( | ) |
A function that clears all events
| void EventManager::ClearListeners | ( | ) |
A function that clears all listeners
int EventManager::m_time [protected] |
int EventManager::m_frames [protected] |
std::list<EventListener*> EventManager::m_listeners [protected] |
std::list<EventListener*>::iterator EventManager::m_iterl [protected] |
std::list<Event*> EventManager::m_events [protected] |
std::list<Event*>::iterator EventManager::m_itere [protected] |
1.5.1-p1