2010-04-05 23:38:59 +02:00
|
|
|
#ifndef EVENTSBASEGLOBAL_H
|
|
|
|
#define EVENTSBASEGLOBAL_H
|
|
|
|
|
2010-07-28 18:02:12 +02:00
|
|
|
#include "EventBase.h"
|
2010-04-05 23:38:59 +02:00
|
|
|
|
|
|
|
namespace Engine {
|
|
|
|
|
|
|
|
/** \brief Registers a listener to a given event type */
|
2010-07-28 18:02:12 +02:00
|
|
|
bool RegisterListener (Module *listener_module, const int event_type);
|
2010-04-05 23:38:59 +02:00
|
|
|
/** \brief Calls all event listeners to handle the events */
|
|
|
|
bool QueueEvent (const EventBasePtr &event);
|
2010-11-27 20:56:38 +01:00
|
|
|
/** \brief Calls the listener handlers immediately
|
|
|
|
*
|
|
|
|
* \warning It is safer to use QueueEvent() instead as the event
|
|
|
|
* \warning handlers are called at a safely defined time and
|
|
|
|
* \warning there is a lower risk deleting entities that still
|
|
|
|
* \warning might be in use somewhere! */
|
2010-04-05 23:38:59 +02:00
|
|
|
bool TriggerEvent (const EventBasePtr &event);
|
|
|
|
|
|
|
|
}
|
|
|
|
#endif /* EVENTSBASEGLOBAL_H */
|