An event handler.
More...
#include <eventHandler.hpp>
|
| EventHandler (const std::function< void(Derived &, const Event &) noexcept > &callbackFunction, bool useEventBus=false) |
|
| EventHandler (const std::function< void(Derived &, const Event &) noexcept > &callbackFunction, anch::events::EventBus< Event > &eventBus) |
|
virtual | ~EventHandler () |
|
virtual void | notify (const Event &event) noexcept |
|
template<typename Event, typename Derived>
class anch::events::EventHandler< Event, Derived >
An event handler.
It provides a simple way to inherits several times from Observer and cutomize event receiving method name.
- Since
- 0.1
- Author
- Vincent Lachenal
template<typename Event , typename Derived >
EventHandler constructor.
Register callback method.
Register itself in global EventBus if set.
- Parameters
-
callbackFunction | the callback method to use on notify |
useEventBus | if true register itself in global EventBus, false otherwise (default) |
template<typename Event , typename Derived >
EventHandler constructor.
Registers callback method.
Register itself in EventBus.
- Parameters
-
callbackFunction | the callback method to use on notify |
eventBus | the EventBus to register itself |
template<typename Event , typename Derived >
template<typename Event , typename Derived >
The documentation for this class was generated from the following file: