class
SushiEngine::EventBus::Bus
Owns every channel of one host and delivers pending events phase by phase.
- Declared in
engine/foundation/event_bus/include/SushiEngine/event_bus/bus.hpp- Inherits
SushiEngine::EventBus::IBus
Every IBus virtual is noexcept, so a throwing handler or an allocation failure inside the bus terminates rather than propagate. A phase with a subscriber must be drained every frame, or end_frame cannot advance that channel's trim point.
Public Methods
Bus | Constructs an empty bus bound to the calling thread as main thread. |
~Bus | |
operator= | |
register_channel | Registers the channel for one event type, or returns the existing one. |
find_channel | Finds the channel registered for |
publish | Appends |
publish_immediate | Calls every live subscriber of the channel now, on the main thread. |
subscribe | Adds a subscriber that the drain of its phase calls per batch. |
unsubscribe | Removes one subscription; no call reaches it after this returns. |
unsubscribe_owner | Removes every subscription |
has_subscribers | Whether |
drain | Delivers every event |
end_frame | Drops every event that each phase with a subscriber has seen. |
statistics | Returns the counters since the last reset. |
reset_statistics | Zeroes the counters. |

