class

EventBus

Module
Events
Header
#include "Events/EventBus.h"
Namespace
Mowo

Type aliases

AliasDescription
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

SignatureNameDescription
EventBus(const EventBus&) = deleteEventBus

Public functions

ReturnsNameDescription
EventBus&GetOut-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=
FEventSubscriptionSubscribeThe 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_tSubscriptionCount
voidUnsubscribe
size_tRemoveAllInModuleUnsubscribes everything a module subscribed and drops the queued events whose type that module defines — the unload sweep.
voidPost
voidDispatchImmediate
voidDispatchImmediate
voidSetPreDispatchHook
voidProcessEvents
voidClear
size_tGetPendingEventCount

Function details

EventBus

C++
EventBus(const EventBus&) = delete

Get

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&) = delete

Subscribe

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() const

Unsubscribe

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() const
Generated from Events/EventBus.h via events.json · Oct 26, 2026Version 1.0.0