Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
Static Public Member Functions | Static Private Member Functions | Static Private Attributes | List of all members
Olympe::TaskExecutionBridge Class Reference

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.
 

Detailed Description

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.

Member Function Documentation

◆ Install()

void Olympe::TaskExecutionBridge::Install ( BridgeSetNodeFn  nodeFn,
BridgeSetBBFn  bbFn 
)
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.

Parameters
nodeFnCalled each frame with the active local node index. Pass nullptr to skip node-highlight updates.
bbFnCalled 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:

◆ IsInstalled()

bool Olympe::TaskExecutionBridge::IsInstalled ( )
static

Returns true when the bridge is currently installed.

Definition at line 81 of file TaskExecutionBridge.cpp.

References s_Installed.

◆ s_OnPublish()

void Olympe::TaskExecutionBridge::s_OnPublish ( EntityID  entity,
int  nodeIndex,
const LocalBlackboard bb 
)
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:

◆ Uninstall()

void Olympe::TaskExecutionBridge::Uninstall ( )
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:

Member Data Documentation

◆ s_BBFn

BridgeSetBBFn Olympe::TaskExecutionBridge::s_BBFn = nullptr
staticprivate

Stored Editor-side blackboard hook. nullptr = no-op.

Definition at line 113 of file TaskExecutionBridge.h.

Referenced by Install(), s_OnPublish(), and Uninstall().

◆ s_Installed

bool Olympe::TaskExecutionBridge::s_Installed = false
staticprivate

Whether the bridge is currently registered with TaskSystem.

Definition at line 116 of file TaskExecutionBridge.h.

Referenced by Install(), IsInstalled(), and Uninstall().

◆ s_NodeFn

BridgeSetNodeFn Olympe::TaskExecutionBridge::s_NodeFn = nullptr
staticprivate

Stored Editor-side node hook. nullptr = no-op.

Definition at line 110 of file TaskExecutionBridge.h.

Referenced by Install(), s_OnPublish(), and Uninstall().


The documentation for this class was generated from the following files: