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::VSGraphExecutor Class Reference

Exécute un graphe ATS Visual Scripting pour une entité sur un frame. More...

#include <VSGraphExecutor.h>

Static Public Member Functions

static void ExecuteFrame (EntityID entity, TaskRunnerComponent &runner, const TaskGraphTemplate &tmpl, LocalBlackboard &localBB, World *worldPtr, float dt)
 Point d'entrée principal : exécute le graphe pour une entité.
 

Static Private Member Functions

static void ResolveDataPins (int32_t nodeID, TaskRunnerComponent &runner, const TaskGraphTemplate &tmpl, LocalBlackboard &localBB)
 Résout les data pins entrantes d'un node et peuple runner.DataPinCache.
 
static int32_t FindExecTarget (int32_t sourceNodeID, const std::string &pinName, const TaskGraphTemplate &tmpl)
 Retourne l'ID du node cible sur un exec pin nommé pinName depuis sourceNodeID.
 
static TaskValue ReadBBValue (const std::string &scopedKey, LocalBlackboard &localBB)
 Lit une valeur BB depuis localBB avec support du scope "local:" et "global:".
 
static void WriteBBValue (const std::string &scopedKey, const TaskValue &value, LocalBlackboard &localBB)
 Écrit une valeur BB dans localBB avec support du scope "local:".
 
static int32_t HandleEntryPoint (int32_t nodeID, const TaskGraphTemplate &tmpl)
 
static int32_t HandleBranch (int32_t nodeID, TaskRunnerComponent &runner, const TaskGraphTemplate &tmpl, LocalBlackboard &localBB)
 
static int32_t HandleSwitch (int32_t nodeID, TaskRunnerComponent &runner, const TaskGraphTemplate &tmpl, LocalBlackboard &localBB)
 
static int32_t HandleVSSequence (int32_t nodeID, TaskRunnerComponent &runner, const TaskGraphTemplate &tmpl)
 
static int32_t HandleWhile (int32_t nodeID, TaskRunnerComponent &runner, const TaskGraphTemplate &tmpl, LocalBlackboard &localBB)
 
static int32_t HandleDoOnce (int32_t nodeID, TaskRunnerComponent &runner, const TaskGraphTemplate &tmpl)
 
static int32_t HandleDelay (int32_t nodeID, TaskRunnerComponent &runner, const TaskGraphTemplate &tmpl, float dt)
 
static int32_t HandleGetBBValue (int32_t nodeID, TaskRunnerComponent &runner, const TaskGraphTemplate &tmpl, LocalBlackboard &localBB)
 
static int32_t HandleSetBBValue (int32_t nodeID, TaskRunnerComponent &runner, const TaskGraphTemplate &tmpl, LocalBlackboard &localBB)
 
static int32_t HandleMathOp (int32_t nodeID, TaskRunnerComponent &runner, const TaskGraphTemplate &tmpl)
 
static int32_t HandleAtomicTask (EntityID entity, int32_t nodeID, TaskRunnerComponent &runner, const TaskGraphTemplate &tmpl, LocalBlackboard &localBB, World *worldPtr, float dt)
 
static int32_t HandleSubGraph (EntityID entity, int32_t nodeID, TaskRunnerComponent &runner, const TaskGraphTemplate &tmpl, LocalBlackboard &localBB, World *worldPtr, float dt, SubGraphCallStack &callStack)
 

Static Private Attributes

static const int MAX_SUBGRAPH_DEPTH = 4
 Out-of-class definition required in C++14 for ODR-used static const members.
 

Detailed Description

Exécute un graphe ATS Visual Scripting pour une entité sur un frame.

Definition at line 111 of file VSGraphExecutor.h.

Member Function Documentation

◆ ExecuteFrame()

void Olympe::VSGraphExecutor::ExecuteFrame ( EntityID  entity,
TaskRunnerComponent runner,
const TaskGraphTemplate tmpl,
LocalBlackboard localBB,
World worldPtr,
float  dt 
)
static

Point d'entrée principal : exécute le graphe pour une entité.

Parameters
entityID de l'entité propriétaire du runner.
runnerComposant runtime mutable de l'entité (CurrentNodeID, BB, etc.).
tmplTemplate immutable du graphe.
localBBBlackboard local de l'entité (initialisé depuis tmpl->Blackboard).
worldPtrPointeur vers World (peut être nullptr en tests).
dtDelta-time du frame courant.

Definition at line 37 of file VSGraphExecutor.cpp.

References Olympe::AtomicTask, Olympe::Branch, Olympe::Delay, Olympe::DoOnce, Olympe::EntryPoint, Olympe::GetBBValue, GetComponentTypeID_Static(), HandleAtomicTask(), HandleBranch(), HandleDelay(), HandleDoOnce(), HandleEntryPoint(), HandleGetBBValue(), HandleMathOp(), HandleSetBBValue(), HandleSubGraph(), HandleSwitch(), HandleVSSequence(), HandleWhile(), Olympe::MathOp, Olympe::MAX_STEPS_PER_FRAME, Olympe::NODE_INDEX_NONE, ResolveDataPins(), Olympe::SetBBValue, Olympe::SubGraph, Olympe::Switch, SYSTEM_LOG, Olympe::VSSequence, and Olympe::While.

Referenced by Olympe::TaskSystem::ExecuteVSFrame(), and HandleSubGraph().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FindExecTarget()

int32_t Olympe::VSGraphExecutor::FindExecTarget ( int32_t  sourceNodeID,
const std::string &  pinName,
const TaskGraphTemplate tmpl 
)
staticprivate

Retourne l'ID du node cible sur un exec pin nommé pinName depuis sourceNodeID.

Retourne NODE_INDEX_NONE si aucune connexion trouvée.

Definition at line 159 of file VSGraphExecutor.cpp.

References GetComponentTypeID_Static(), Olympe::NODE_INDEX_NONE, and Olympe::ExecPinConnection::TargetNodeID.

Referenced by HandleAtomicTask(), HandleBranch(), HandleDelay(), HandleDoOnce(), HandleEntryPoint(), HandleGetBBValue(), HandleMathOp(), HandleSetBBValue(), HandleSubGraph(), HandleSwitch(), HandleVSSequence(), and HandleWhile().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleAtomicTask()

int32_t Olympe::VSGraphExecutor::HandleAtomicTask ( EntityID  entity,
int32_t  nodeID,
TaskRunnerComponent runner,
const TaskGraphTemplate tmpl,
LocalBlackboard localBB,
World worldPtr,
float  dt 
)
staticprivate

◆ HandleBranch()

int32_t Olympe::VSGraphExecutor::HandleBranch ( int32_t  nodeID,
TaskRunnerComponent runner,
const TaskGraphTemplate tmpl,
LocalBlackboard localBB 
)
staticprivate

◆ HandleDelay()

int32_t Olympe::VSGraphExecutor::HandleDelay ( int32_t  nodeID,
TaskRunnerComponent runner,
const TaskGraphTemplate tmpl,
float  dt 
)
staticprivate

Definition at line 591 of file VSGraphExecutor.cpp.

References FindExecTarget(), GetComponentTypeID_Static(), and Olympe::NODE_INDEX_NONE.

Referenced by ExecuteFrame().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleDoOnce()

int32_t Olympe::VSGraphExecutor::HandleDoOnce ( int32_t  nodeID,
TaskRunnerComponent runner,
const TaskGraphTemplate tmpl 
)
staticprivate

Definition at line 571 of file VSGraphExecutor.cpp.

References FindExecTarget(), GetComponentTypeID_Static(), and Olympe::NODE_INDEX_NONE.

Referenced by ExecuteFrame().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleEntryPoint()

int32_t Olympe::VSGraphExecutor::HandleEntryPoint ( int32_t  nodeID,
const TaskGraphTemplate tmpl 
)
staticprivate

Definition at line 217 of file VSGraphExecutor.cpp.

References FindExecTarget(), and GetComponentTypeID_Static().

Referenced by ExecuteFrame().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleGetBBValue()

int32_t Olympe::VSGraphExecutor::HandleGetBBValue ( int32_t  nodeID,
TaskRunnerComponent runner,
const TaskGraphTemplate tmpl,
LocalBlackboard localBB 
)
staticprivate

Definition at line 618 of file VSGraphExecutor.cpp.

References FindExecTarget(), GetComponentTypeID_Static(), Olympe::NODE_INDEX_NONE, and ReadBBValue().

Referenced by ExecuteFrame().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleMathOp()

int32_t Olympe::VSGraphExecutor::HandleMathOp ( int32_t  nodeID,
TaskRunnerComponent runner,
const TaskGraphTemplate tmpl 
)
staticprivate

Definition at line 677 of file VSGraphExecutor.cpp.

References Olympe::TaskValue::AsFloat(), FindExecTarget(), Olympe::Float, GetComponentTypeID_Static(), Olympe::Int, Olympe::NODE_INDEX_NONE, and SYSTEM_LOG.

Referenced by ExecuteFrame().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleSetBBValue()

int32_t Olympe::VSGraphExecutor::HandleSetBBValue ( int32_t  nodeID,
TaskRunnerComponent runner,
const TaskGraphTemplate tmpl,
LocalBlackboard localBB 
)
staticprivate

Definition at line 643 of file VSGraphExecutor.cpp.

References FindExecTarget(), GetComponentTypeID_Static(), Olympe::NODE_INDEX_NONE, SYSTEM_LOG, and WriteBBValue().

Referenced by ExecuteFrame().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleSubGraph()

int32_t Olympe::VSGraphExecutor::HandleSubGraph ( EntityID  entity,
int32_t  nodeID,
TaskRunnerComponent runner,
const TaskGraphTemplate tmpl,
LocalBlackboard localBB,
World worldPtr,
float  dt,
SubGraphCallStack callStack 
)
staticprivate

◆ HandleSwitch()

int32_t Olympe::VSGraphExecutor::HandleSwitch ( int32_t  nodeID,
TaskRunnerComponent runner,
const TaskGraphTemplate tmpl,
LocalBlackboard localBB 
)
staticprivate

Definition at line 439 of file VSGraphExecutor.cpp.

References Olympe::TaskValue::AsString(), FindExecTarget(), GetComponentTypeID_Static(), Olympe::Int, Olympe::NODE_INDEX_NONE, and Olympe::String.

Referenced by ExecuteFrame().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleVSSequence()

int32_t Olympe::VSGraphExecutor::HandleVSSequence ( int32_t  nodeID,
TaskRunnerComponent runner,
const TaskGraphTemplate tmpl 
)
staticprivate

Definition at line 494 of file VSGraphExecutor.cpp.

References Olympe::TaskNodeDefinition::ChildrenIDs, FindExecTarget(), GetComponentTypeID_Static(), and Olympe::NODE_INDEX_NONE.

Referenced by ExecuteFrame().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleWhile()

int32_t Olympe::VSGraphExecutor::HandleWhile ( int32_t  nodeID,
TaskRunnerComponent runner,
const TaskGraphTemplate tmpl,
LocalBlackboard localBB 
)
staticprivate

Definition at line 520 of file VSGraphExecutor.cpp.

References Olympe::TaskValue::AsBool(), Olympe::Bool, Olympe::TaskNodeDefinition::ConditionID, FindExecTarget(), GetComponentTypeID_Static(), Olympe::Int, and SYSTEM_LOG.

Referenced by ExecuteFrame().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ReadBBValue()

TaskValue Olympe::VSGraphExecutor::ReadBBValue ( const std::string &  scopedKey,
LocalBlackboard localBB 
)
staticprivate

Lit une valeur BB depuis localBB avec support du scope "local:" et "global:".

Definition at line 200 of file VSGraphExecutor.cpp.

References GetComponentTypeID_Static().

Referenced by HandleGetBBValue().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ResolveDataPins()

void Olympe::VSGraphExecutor::ResolveDataPins ( int32_t  nodeID,
TaskRunnerComponent runner,
const TaskGraphTemplate tmpl,
LocalBlackboard localBB 
)
staticprivate

Résout les data pins entrantes d'un node et peuple runner.DataPinCache.

Definition at line 178 of file VSGraphExecutor.cpp.

References Olympe::DataPinEvaluator::EvaluateNodeInputPins(), GetComponentTypeID_Static(), and SYSTEM_LOG.

Referenced by ExecuteFrame().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WriteBBValue()

void Olympe::VSGraphExecutor::WriteBBValue ( const std::string &  scopedKey,
const TaskValue value,
LocalBlackboard localBB 
)
staticprivate

Écrit une valeur BB dans localBB avec support du scope "local:".

Definition at line 206 of file VSGraphExecutor.cpp.

References GetComponentTypeID_Static().

Referenced by HandleSetBBValue().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ MAX_SUBGRAPH_DEPTH

const int Olympe::VSGraphExecutor::MAX_SUBGRAPH_DEPTH = 4
staticprivate

Out-of-class definition required in C++14 for ODR-used static const members.

Definition at line 225 of file VSGraphExecutor.h.

Referenced by HandleSubGraph().


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