|
| template<typename EventType > |
| static void | AddEventListener (const MxString &name, std::function< void(EventType &)> func) |
| |
| template<typename FunctionType > |
| static void | AddEventListener (const MxString &name, FunctionType &&func) |
| |
| static void | RemoveEventListener (const MxString &name) |
| |
| template<typename Event > |
| static void | Invoke (Event &event) |
| |
| static void | AddEvent (UniqueRef< IEvent > event) |
| |
| static void | InvokeAll () |
| |
§ AddEvent()
| static void MxEngine::EventManager::AddEvent |
( |
UniqueRef< IEvent > |
event | ) |
|
|
inlinestatic |
Adds event to event queue. All such events will be dispatched in next frames in the order they were added
- Parameters
-
| event | event to shedule dispatch |
§ AddEventListener() [1/2]
template<typename EventType >
| static void MxEngine::EventManager::AddEventListener |
( |
const MxString & |
name, |
|
|
std::function< void(EventType &)> |
func |
|
) |
| |
|
inlinestatic |
adds new event listener to dispatcher (listener placed in waiting queue until next frame). Note that multiple listeners may have same name. If so, deleting by name will result in removing all of them
- Parameters
-
| name | name of listener (used for deleting listener) |
| func | listener callback functor |
§ AddEventListener() [2/2]
template<typename FunctionType >
| static void MxEngine::EventManager::AddEventListener |
( |
const MxString & |
name, |
|
|
FunctionType && |
func |
|
) |
| |
|
inlinestatic |
adds new event listener to dispatcher (listener is placed in waiting queue until next frame). Note that multiple listeners may have same name. If so, deleting by name will result in removing all of them
- Parameters
-
| name | name of listener (used for deleting listener) |
| func | listener callback functor |
§ Invoke()
template<typename Event >
| static void MxEngine::EventManager::Invoke |
( |
Event & |
event | ) |
|
|
inlinestatic |
Immediately invokes event of specific type. Note that invokation also forces queues to be invalidated
- Parameters
-
§ InvokeAll()
| static void MxEngine::EventManager::InvokeAll |
( |
| ) |
|
|
inlinestatic |
Invokes all shedules events in the order they were added. Note that invoke also forces queues to be invalidated
§ RemoveEventListener()
| static void MxEngine::EventManager::RemoveEventListener |
( |
const MxString & |
name | ) |
|
|
inlinestatic |
removes all event listeners by their names (action is placed in waiting queue until next frame)
- Parameters
-
| name | name of listeners to be deleted |
The documentation for this class was generated from the following file: