37 void emit(
const Entity& entity,
const E& event)
const;
The event dispatcher is a class responsible for forwarding events to their respective listeners.
Definition EventDispatcher.hpp:20
virtual ~AbstractEntityEventDispatcher()=default
Defaulted virtual destructor.
A type-safe event dispatcher implementation for events of type E.
Definition EventDispatcher.hpp:28
WeakEventConnection subscribe(Subscriber &&subscriber)
Subscribe a new subscriber of type Subscriber.
Definition EventDispatcher.hpp:53
void emit(const Entity &entity, const E &event) const
Emits a event.
Definition EventDispatcher.hpp:51
UnsafeEvent< void(const Entity &, const E &)> mSignal
A signal that effectively propagates the event.
Definition EventDispatcher.hpp:31
The base entity class.
Definition Entity.hpp:41
Base template for the event class.
Definition Event.hpp:27
Connection class.
Definition Event.hpp:44
Definition Application.hpp:19
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25