#include <OE/Application/EventHandler.hpp>
template<class TEvent = Event>
EventHandler class
Contents
Public types
- using EventCallback = std::function<void(TEvent&)>
- using EventCallbackPtr = std::shared_ptr<EventCallback>
- using Callbacks = std::vector<EventCallbackPtr>
Constructors, destructors, conversion operators
Public functions
- auto AddListener(EventCallback callback) -> EventCallbackPtr
-
template<class T>auto AddListener(T* instance, void(T::*)(TEvent&) callback) -> EventCallbackPtr
- void RemoveListener(EventCallbackPtr callbackPtr)
- void FireEvent(TEvent& event) virtual