|
CeresEngine 0.2.0
A game development framework
|
A type-safe event dispatcher implementation for events of type E.
More...
#include <CeresEngine/Entity/EventDispatcher.hpp>
Public Member Functions | |
| void | emit (const Entity &entity, const E &event) const |
| Emits a event. | |
| template<typename Subscriber > | |
| WeakEventConnection | subscribe (Subscriber &&subscriber) |
Subscribe a new subscriber of type Subscriber. | |
Public Member Functions inherited from CeresEngine::AbstractEntityEventDispatcher | |
| virtual | ~AbstractEntityEventDispatcher ()=default |
| Defaulted virtual destructor. | |
Private Attributes | |
| UnsafeEvent< void(const Entity &, const E &)> | mSignal |
| A signal that effectively propagates the event. | |
A type-safe event dispatcher implementation for events of type E.
| E | the event type |
Emits a event.
| entity | The entity that has emitted the event |
| event | The event being emitted |
| WeakEventConnection CeresEngine::EntityEventDispatcher< E >::subscribe | ( | Subscriber && | subscriber | ) |
Subscribe a new subscriber of type Subscriber.
| Subscriber | the subscriber type |
| subscriber | The subscriber |
|
private |
A signal that effectively propagates the event.