![]() |
Leviathan
0.8.0.0
Leviathan game engine
|
Allows object to register for events that can be fired from anywhere. More...
#include <EventHandler.h>
Public Member Functions | |
DLLEXPORT | EventHandler () |
DLLEXPORT | ~EventHandler () |
DLLEXPORT bool | Init () |
DLLEXPORT void | Release () |
DLLEXPORT void | CallEvent (Event *event) |
DLLEXPORT void | CallEvent (const Event::pointer &event) |
DLLEXPORT void | CallEvent (GenericEvent *event) |
DLLEXPORT void | CallEvent (const GenericEvent::pointer &event) |
DLLEXPORT bool | RegisterForEvent (CallableObject *toregister, EVENT_TYPE totype) |
DLLEXPORT bool | RegisterForEvent (CallableObject *toregister, const std::string &genericname) |
DLLEXPORT void | Unregister (CallableObject *caller, EVENT_TYPE type, bool all=false) |
DLLEXPORT void | Unregister (CallableObject *caller, const std::string &genericname, bool all=false) |
![]() | |
DLLEXPORT | ThreadSafeGeneric () |
DLLEXPORT | ~ThreadSafeGeneric () |
FORCE_INLINE void | VerifyLock (RecursiveLock &guard) const |
FORCE_INLINE void | VerifyLock (Lock &lockit) const |
Additional Inherited Members | |
![]() | |
using | LockT = typename LockTypeResolver< MutexType >::LType |
![]() | |
MutexType | ObjectsLock |
Allows object to register for events that can be fired from anywhere.
This is recursive to allow EventCallbacks to also fire events. This makes it possible to cause a stackoverflow but makes it easier to make events that fire a different event
Definition at line 15 of file EventHandler.h.
EventHandler::EventHandler | ( | ) |
Definition at line 6 of file EventHandler.cpp.
EventHandler::~EventHandler | ( | ) |
Definition at line 10 of file EventHandler.cpp.
void EventHandler::CallEvent | ( | Event * | event | ) |
event | The event to send. Reference count will be decremented by this |
Definition at line 28 of file EventHandler.cpp.
|
inline |
Definition at line 25 of file EventHandler.h.
DLLEXPORT void Leviathan::EventHandler::CallEvent | ( | GenericEvent * | event | ) |
event | The event to send. Reference count will be decremented by this |
Definition at line 54 of file EventHandler.cpp.
|
inline |
Definition at line 35 of file EventHandler.h.
bool EventHandler::Init | ( | ) |
Definition at line 14 of file EventHandler.cpp.
bool EventHandler::RegisterForEvent | ( | CallableObject * | toregister, |
EVENT_TYPE | totype | ||
) |
Definition at line 81 of file EventHandler.cpp.
DLLEXPORT bool Leviathan::EventHandler::RegisterForEvent | ( | CallableObject * | toregister, |
const std::string & | genericname | ||
) |
Definition at line 87 of file EventHandler.cpp.
void EventHandler::Release | ( | ) |
Definition at line 18 of file EventHandler.cpp.
void EventHandler::Unregister | ( | CallableObject * | caller, |
EVENT_TYPE | type, | ||
bool | all = false |
||
) |
Definition at line 95 of file EventHandler.cpp.
DLLEXPORT void Leviathan::EventHandler::Unregister | ( | CallableObject * | caller, |
const std::string & | genericname, | ||
bool | all = false |
||
) |
Definition at line 115 of file EventHandler.cpp.