class

VisualScriptDispatcherRegistry

Module
VisualScripting
Header
#include "VisualScripting/VisualScriptDispatcherRegistry.h"
Namespace
Mowo

Public functions

ReturnsNameDescription
VisualScriptDispatcherRegistry&Get
voidBindBind handler (a function on the listener's class, captured in listenerCtx) to dispatcher on owner.
voidUnbindRemove a specific binding (owner, dispatcher, listener, handler).
std::vector<VisualScriptDispatcherBinding>CollectLive bindings for (owner, dispatcher), pruning any whose owner or listener has been collected.
voidRemoveObjectDrop every binding referencing obj as owner OR listener (call on EndPlay so a dead actor leaves no stale entries).
voidRebindClassHot-reload repair: bindings capture the listener's VisualScriptClass* by value, so a Reregister that frees the old definition leaves them dangling — latents are purged for exactly this reason, and these two keep the binding table on the same rule.
voidRemoveClass
voidClear
size_tNum
boolBeginBroadcastNesting cap for cross-actor broadcasts (A's handler broadcasting back into B and so on — all synchronous, all on this stack).
voidEndBroadcast

Function details

Get

C++
static VisualScriptDispatcherRegistry& Get()

Bind

C++
void Bind(MObject* owner, const std::string& dispatcher, const std::string& handler, const VisualScriptContext& listenerCtx)

Bind handler (a function on the listener's class, captured in listenerCtx) to dispatcher on owner. Idempotent for an identical (owner, dispatcher, listener, handler) tuple.

Unbind

C++
void Unbind(MObject* owner, const std::string& dispatcher, const std::string& handler, MObject* listener)

Remove a specific binding (owner, dispatcher, listener, handler).

Collect

C++
std::vector<VisualScriptDispatcherBinding> Collect(MObject* owner, const std::string& dispatcher)

Live bindings for (owner, dispatcher), pruning any whose owner or listener has been collected.

RemoveObject

C++
void RemoveObject(MObject* obj)

Drop every binding referencing obj as owner OR listener (call on EndPlay so a dead actor leaves no stale entries).

RebindClass

C++
void RebindClass(const VisualScriptClass* oldDef, const VisualScriptClass* newDef)

Hot-reload repair: bindings capture the listener's VisualScriptClass* by value, so a Reregister that frees the old definition leaves them dangling — latents are purged for exactly this reason, and these two keep the binding table on the same rule. RebindClass re-points captured contexts at the swapped-in definition; RemoveClass drops bindings whose class is being unregistered outright.

RemoveClass

C++
void RemoveClass(const VisualScriptClass* def)

Clear

C++
void Clear()

Num

C++
size_t Num() const

BeginBroadcast

C++
bool BeginBroadcast()

Nesting cap for cross-actor broadcasts (A's handler broadcasting back into B and so on — all synchronous, all on this stack). Mirrors MWorld::FirePin's wire-recursion cap. Returns false when the cap is hit; a true return must be paired with EndBroadcast.

EndBroadcast

C++
void EndBroadcast()
Generated from VisualScripting/VisualScriptDispatcherRegistry.h via visualscripting.json · Nov 5, 2026Version 1.0.0