class
EventBus
- Module
- Events
- Header
#include "Events/EventBus.h"- Namespace
Mowo
Type aliases
| Alias | Description |
|---|---|
using FPreDispatchHook = std::function<void(Event&)> | Pre-dispatch hook fires before per-type handlers run on a queued event, giving the application first crack at handled consumption. |
Constructors
| Signature | Name | Description |
|---|---|---|
EventBus(const EventBus&) = delete | EventBus |
Public functions
| Returns | Name | Description |
|---|---|---|
EventBus& | Get | Out-of-line — a header-inline function-local static duplicates the bus per DLL, so cross-module posts land in a queue nobody drains. |
EventBus& | operator= | |
FEventSubscription | Subscribe | The subscription remembers the module it was made from (owner, by default FModuleAnchor evaluated in the caller's image): a plugin that never unsubscribed left a callback into its freed code on the bus. |
size_t | SubscriptionCount | |
void | Unsubscribe | |
size_t | RemoveAllInModule | Unsubscribes everything a module subscribed and drops the queued events whose type that module defines — the unload sweep. |
void | Post | |
void | DispatchImmediate | |
void | DispatchImmediate | |
void | SetPreDispatchHook | |
void | ProcessEvents | |
void | Clear | |
size_t | GetPendingEventCount |
Function details
EventBus
C++
EventBus(const EventBus&) = deleteGet
C++
static EventBus& Get()Out-of-line — a header-inline function-local static duplicates the bus per DLL, so cross-module posts land in a queue nobody drains.
operator=
C++
EventBus& operator=(const EventBus&) = deleteSubscribe
C++
template<typename T> FEventSubscription Subscribe(std::function<void(T&)> callback, const void* owner = FModuleAnchor::Here())The subscription remembers the module it was made from (owner, by default FModuleAnchor evaluated in the caller's image): a plugin that never unsubscribed left a callback into its freed code on the bus.
SubscriptionCount
C++
size_t SubscriptionCount() constUnsubscribe
C++
void Unsubscribe(FEventSubscription& sub)RemoveAllInModule
C++
size_t RemoveAllInModule(void* moduleHandle)Unsubscribes everything a module subscribed and drops the queued events whose type that module defines — the unload sweep.
Post
C++
template<typename T, typename... Args> void Post(Args&&... args)DispatchImmediate
C++
void DispatchImmediate(Event& event)DispatchImmediate
C++
template<typename T, typename... Args> void DispatchImmediate(Args&&... args)SetPreDispatchHook
C++
void SetPreDispatchHook(FPreDispatchHook hook)ProcessEvents
C++
void ProcessEvents()Clear
C++
void Clear()GetPendingEventCount
C++
size_t GetPendingEventCount() constGenerated from Events/EventBus.h via events.json · Oct 26, 2026Version 1.0.0