8 template <
typename T,
typename F>
11 if (m_event.
eventType() == T::StaticType())
13 m_event.handled = func(
static_cast<T&
>(m_event));
EventDispatcher(Event &event)
Instantiates a new EventDispatcher for the given event.
Definition EventDispatcher.h:5
bool dispatch(const F &func)
Dispatches the event to the appropriate event handler.
Definition EventDispatcher.h:9
A base class for all events in SPARK.
Definition Event.h:53
virtual EventType eventType() const =0
Gets the type of the event.