27 return eventRegistry_;
54 return impl_->eventRegistry().registerEvent(std::move(event));
58 return impl_->eventRegistry().activateEvent(
id);
62 return impl_->eventRegistry().activateAfterEffect(
id);
66 impl_->eventRegistry().executeActiveEvents();
70 impl_->eventRegistry().executeEvent(
id);
74 return impl_->eventRegistry().registerAfterEffect(std::move(event));
78 impl_->eventRegistry().cleanInvalidEvents();
82 impl_->eventRegistry().removeAfterEffect(
id);
86 impl_->eventRegistry().clear();
90 std::shared_ptr<EventEngine> impl_;
Definition: event_context.hpp:23
EventRegistry & eventRegistry() override
Definition: event_context.hpp:25
This object can be copied with low cost.
Definition: event_context.hpp:38
void removeAfterEffect(EventIdType id)
Definition: event_context.hpp:80
EventIdType registerAfterEffect(Event event)
Definition: event_context.hpp:72
auto activateEvent(EventIdType id)
Definition: event_context.hpp:56
EventContext()
Definition: event_context.hpp:43
void executeEvent(EventIdType id)
Definition: event_context.hpp:68
void reset()
Definition: event_context.hpp:84
EventContext & operator=(EventContext &&)=default
void cleanInvalidEvents()
Definition: event_context.hpp:76
EventContext(EventContext &&)=default
auto activateAfterEffect(EventIdType id)
Definition: event_context.hpp:60
EventRegistry::EventIdType EventIdType
Definition: event_context.hpp:40
void executeActiveEventsImmediately()
Definition: event_context.hpp:64
EventContext & operator=(EventContext const &)=default
constexpr static auto invalidEventId
Definition: event_context.hpp:41
EventIdType registerEvent(Event event)
Definition: event_context.hpp:52
EventContext(EventContext const &)=default
Definition: event_context.hpp:10
EventEngine(EventEngine &&)=default
EventEngine & operator=(EventEngine &&)=default
virtual EventRegistry & eventRegistry()=0
EventEngine & operator=(const EventEngine &)=default
virtual ~EventEngine()=default
EventEngine(const EventEngine &)=default
Definition: event_registry.hpp:14
constexpr static EventIdType invalidEventId
Definition: event_registry.hpp:18
SelectablesRegistry< Event >::IdType EventIdType
Definition: event_registry.hpp:17
Definition: file_dialog.hpp:6
thread_local EventContext globalEventContext
Definition: event_context.cpp:5