File Events.h
Go to the source code of this file
Type-safe event system for decoupled communication across layers. More...
#include <functional>#include <queue>#include <typeindex>#include <unordered_map>
Classes
| Type | Name |
|---|---|
| class | EventPool Type-safe event dispatcher with deferred execution queue. |
| class | Events Base class for event types (currently unused). |
Detailed Description
The EventPool enables publish-subscribe pattern with compile-time type safety. Components emit events without knowing subscribers, preventing direct coupling.
Architecture: * UI emits user actions as events * Editor subscribes to events and mutates state * Renderer subscribes to config changes * No layer directly calls into another layer
Execution model: * emit() enqueues an event for deferred dispatch. * process() drains the queue, dispatching all pending events in FIFO order. * Events emitted from within a handler are appended to the end of the queue, ensuring deterministic breadth-first ordering for event chains. * Call process() once per frame, after the UI layer has finished rendering.
The documentation for this class was generated from the following file src/editor/Events.h