Elevate Engine 1
Loading...
Searching...
No Matches
Elevate::EventDispatcher Class Reference

#include <Event.h>

Public Member Functions

 EventDispatcher (Event &event)
 
template<typename T >
bool Dispatch (EventFn< T > func)
 

Detailed Description

Definition at line 56 of file Event.h.

Constructor & Destructor Documentation

◆ EventDispatcher()

Elevate::EventDispatcher::EventDispatcher ( Event event)
inline

Definition at line 61 of file Event.h.

62 : m_Event(event)
63 {
64 }

Member Function Documentation

◆ Dispatch()

template<typename T >
bool Elevate::EventDispatcher::Dispatch ( EventFn< T >  func)
inline

Definition at line 67 of file Event.h.

68 {
69 if (m_Event.GetEventType() == T::GetStaticType())
70 {
71 m_Event.m_Handled = func(*(T*)&m_Event);
72 return true;
73 }
74 return false;
75 }
virtual EventType GetEventType() const =0
bool m_Handled
Definition Event.h:53

The documentation for this class was generated from the following file: