28#include <utility/event/event.hpp>
30#include "guillaume/event/event_subscriber.hpp"
90 template<utility::event::InheritFromEvent EventType>
class EventManager
95 std::shared_ptr<EventSubscriber<EventType>>
99 std::shared_ptr<EventType>
149#include "guillaume/event/event_manager.tpp"
Hands each engine event to the listeners subscribed to its type.
virtual ~EventManager(void)=default
Virtual destructor.
void consumeNextEvent(void)
Take the oldest queued event and make it the last event.
EventManager(EventBus &eventBus)
Subscribe to a bus; events of type EventType published after this call are queued.
std::shared_ptr< EventType > getLastEvent(void)
Get the event taken by the most recent consumeNextEvent() that found one.
bool hasPendingEvents(void) const
Tell whether at least one event is queued, waiting for consumeNextEvent().
Delivery of engine events to the systems that subscribed to them.