![]() |
Olympe Engine 2.0
2D Game Engine with ECS Architecture
|
Mediator that publishes per-frame task-runner state to the Editor. More...
#include <TaskExecutionBridge.h>
Static Public Member Functions | |
| static void | Install (BridgeSetNodeFn nodeFn, BridgeSetBBFn bbFn) |
| Install the bridge and register Editor-side hooks. | |
| static void | Uninstall () |
| Uninstall the bridge. | |
| static bool | IsInstalled () |
| Returns true when the bridge is currently installed. | |
Static Private Member Functions | |
| static void | s_OnPublish (EntityID entity, int nodeIndex, const LocalBlackboard *bb) |
| The actual callback registered with TaskSystem. | |
Static Private Attributes | |
| static BridgeSetNodeFn | s_NodeFn = nullptr |
| Stored Editor-side node hook. nullptr = no-op. | |
| static BridgeSetBBFn | s_BBFn = nullptr |
| Stored Editor-side blackboard hook. nullptr = no-op. | |
| static bool | s_Installed = false |
| Whether the bridge is currently registered with TaskSystem. | |
Mediator that publishes per-frame task-runner state to the Editor.
All members are static; the class is not instantiable. This mirrors the pattern used by TaskSystem::SetEditorPublishCallback.
Definition at line 63 of file TaskExecutionBridge.h.
|
static |
Install the bridge and register Editor-side hooks.
Registers a static callback with TaskSystem::SetEditorPublishCallback and stores the provided hook functions. Safe to call multiple times; subsequent calls replace the previous hooks.
| nodeFn | Called each frame with the active local node index. Pass nullptr to skip node-highlight updates. |
| bbFn | Called each frame with a pointer to the live blackboard. Pass nullptr to skip blackboard updates. |
Definition at line 48 of file TaskExecutionBridge.cpp.
References GetComponentTypeID_Static(), s_BBFn, s_Installed, s_NodeFn, s_OnPublish(), Olympe::TaskSystem::SetEditorPublishCallback(), and SYSTEM_LOG.
Referenced by Olympe::WorldBridge_RegisterTaskCallback().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Returns true when the bridge is currently installed.
Definition at line 81 of file TaskExecutionBridge.cpp.
References s_Installed.
|
staticprivate |
The actual callback registered with TaskSystem.
Forwards nodeIndex to s_NodeFn and bb to s_BBFn when they are non-null. A frame-local copy of the blackboard is made before calling s_BBFn so the pointer remains valid for the duration of the call.
Definition at line 29 of file TaskExecutionBridge.cpp.
References GetComponentTypeID_Static(), s_BBFn, and s_NodeFn.
Referenced by Install().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Uninstall the bridge.
Clears the hooks and passes nullptr to TaskSystem::SetEditorPublishCallback to disable publishing.
Definition at line 67 of file TaskExecutionBridge.cpp.
References s_BBFn, s_Installed, s_NodeFn, Olympe::TaskSystem::SetEditorPublishCallback(), and SYSTEM_LOG.
Referenced by Olympe::WorldBridge_UnregisterTaskCallback().
Here is the call graph for this function:
Here is the caller graph for this function:
|
staticprivate |
Stored Editor-side blackboard hook. nullptr = no-op.
Definition at line 113 of file TaskExecutionBridge.h.
Referenced by Install(), s_OnPublish(), and Uninstall().
Whether the bridge is currently registered with TaskSystem.
Definition at line 116 of file TaskExecutionBridge.h.
Referenced by Install(), IsInstalled(), and Uninstall().
|
staticprivate |
Stored Editor-side node hook. nullptr = no-op.
Definition at line 110 of file TaskExecutionBridge.h.
Referenced by Install(), s_OnPublish(), and Uninstall().