23#include "guillaume/event/event_bus.hpp"
28 void EventBus::dispatchToListeners(
29 std::shared_ptr<utility::event::Event> event, ListenerList &listeners)
31 for (
auto &listener: listeners) {
41 auto *rawEvent =
event.get();
46 auto it = _typedListeners.find(
typeid(*rawEvent));
47 if (it != _typedListeners.end()) {
48 dispatchToListeners(std::move(
event), it->second);
void publish(std::shared_ptr< utility::event::Event > event)
Call, before returning, every listener subscribed to the exact type of an event.
Delivery of engine events to the systems that subscribed to them.