|
Muto 0.0.1
|
Stack-based templated event dispatcher. More...
#include <Event.h>
Public Member Functions | |
| template<typename T > | |
| bool | Dispatch (EventFn< T > func) |
| Dispatch the event to the appropriate handler if the types match. | |
| EventDispatcher (Event &event) | |
| Construct an EventDispatcher for a specific event. | |
Private Types | |
| template<typename T > | |
| using | EventFn = std::function< bool(T &)> |
| Type alias for event handling functions. | |
Private Attributes | |
| Event & | m_Event |
| The event to be dispatched. | |
Stack-based templated event dispatcher.
|
private |
Type alias for event handling functions.
|
inline |
Construct an EventDispatcher for a specific event.
| event | The event to dispatch. |
References m_Event.
Referenced by Muto::Application::OnEvent(), Muto::EditorCamera::OnEvent(), Muto::OrthographicCameraController::OnEvent(), and Muto::EditorLayer::OnEvent().
Dispatch the event to the appropriate handler if the types match.
| T | The type of the event to dispatch. |
| func | The function to handle the event. |
References Muto::Event::GetEventType(), Muto::Event::Handled, and m_Event.
|
private |
The event to be dispatched.
Referenced by Dispatch(), and EventDispatcher().