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

Stateless global verifier for ATS Visual Script graphs. More...

#include <VSGraphVerifier.h>

Static Public Member Functions

static VSVerificationResult Verify (const TaskGraphTemplate &graph)
 Run all verification rules on the given graph.
 

Private Member Functions

 VSGraphVerifier ()=delete
 

Static Private Member Functions

static void CheckEntryPoint (const TaskGraphTemplate &g, VSVerificationResult &r)
 
static void CheckDanglingNodes (const TaskGraphTemplate &g, VSVerificationResult &r)
 
static void CheckExecCycles (const TaskGraphTemplate &g, VSVerificationResult &r)
 
static void CheckSubGraphCircular (const TaskGraphTemplate &g, VSVerificationResult &r)
 
static void CheckExecPinTypes (const TaskGraphTemplate &g, VSVerificationResult &r)
 
static void CheckDataPinTypes (const TaskGraphTemplate &g, VSVerificationResult &r)
 
static void CheckPinDirections (const TaskGraphTemplate &g, VSVerificationResult &r)
 
static void CheckBlackboardKeys (const TaskGraphTemplate &g, VSVerificationResult &r)
 
static void CheckBlackboardTypes (const TaskGraphTemplate &g, VSVerificationResult &r)
 
static void CheckSwitchNodes (const TaskGraphTemplate &g, VSVerificationResult &r)
 
static void CheckAtomicTaskIDs (const TaskGraphTemplate &g, VSVerificationResult &r)
 
static void CheckConditionIDs (const TaskGraphTemplate &g, VSVerificationResult &r)
 
static void CheckMathOperators (const TaskGraphTemplate &g, VSVerificationResult &r)
 
static void CheckSubGraphPaths (const TaskGraphTemplate &g, VSVerificationResult &r)
 
static void CheckConditionParams (const TaskGraphTemplate &g, VSVerificationResult &r)
 
static void CheckBBKeyCompatibility (const TaskGraphTemplate &g, VSVerificationResult &r)
 
static void CheckConditionStructure (const TaskGraphTemplate &g, VSVerificationResult &r)
 
static void CheckNodeParameterWarnings (const TaskGraphTemplate &g, VSVerificationResult &r)
 
static void CheckReachability (const TaskGraphTemplate &g, VSVerificationResult &r)
 
static void AddIssue (VSVerificationResult &r, VSVerificationSeverity sev, int nodeID, const std::string &ruleID, const std::string &message)
 

Detailed Description

Stateless global verifier for ATS Visual Script graphs.

Call VSGraphVerifier::Verify(graph) to run all 14 rules on the graph. The result contains zero or more VSVerificationIssue entries.

Rules implemented: E001 — Exactly one EntryPoint node required E002 — Dangling node (no exec in or out, except EntryPoint) E003 — Exec cycle detected (iterative DFS) E004 — Circular SubGraph reference E005 — Exec connection references unknown node E006 — Incompatible data pin types E007 — Inverted pin direction (output connected to output, or input to input) E008 — Unknown Blackboard key in GetBBValue/SetBBValue E009 — Blackboard type mismatch E010 — Switch node missing switchVariable E011 — Switch node has duplicate case values E012 — Switch node has a case with empty pin name W001 — AtomicTask with empty AtomicTaskID W002 — Delay with DelaySeconds <= 0 W003 — SubGraph with empty SubGraphPath W004 — MathOp with empty MathOperator I001 — Node not reachable from EntryPoint E040 — Branch/While: Pin mode with empty pin reference E041 — Branch/While: Variable mode but variable not in blackboard E042 — Branch/While: Type mismatch between left and right operands W015 — Branch/While: Const vs Const condition (always true/false — optimisation hint) W016 — Branch/While: Pin mode selected but no DataConnection for that pin

Definition at line 88 of file VSGraphVerifier.h.

Constructor & Destructor Documentation

◆ VSGraphVerifier()

Olympe::VSGraphVerifier::VSGraphVerifier ( )
privatedelete

Member Function Documentation

◆ AddIssue()

void Olympe::VSGraphVerifier::AddIssue ( VSVerificationResult r,
VSVerificationSeverity  sev,
int  nodeID,
const std::string &  ruleID,
const std::string &  message 
)
staticprivate

◆ CheckAtomicTaskIDs()

void Olympe::VSGraphVerifier::CheckAtomicTaskIDs ( const TaskGraphTemplate g,
VSVerificationResult r 
)
staticprivate

Definition at line 806 of file VSGraphVerifier.cpp.

References AddIssue(), Olympe::AtomicTask, Olympe::AtomicTaskUIRegistry::Get(), GetComponentTypeID_Static(), Olympe::TaskNodeDefinition::NodeID, and Olympe::Warning.

Referenced by Verify().

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

◆ CheckBBKeyCompatibility()

void Olympe::VSGraphVerifier::CheckBBKeyCompatibility ( const TaskGraphTemplate g,
VSVerificationResult r 
)
staticprivate

Definition at line 987 of file VSGraphVerifier.cpp.

References AddIssue(), Olympe::ForEach, GetComponentTypeID_Static(), Olympe::List, Olympe::TaskNodeDefinition::NodeID, and Olympe::Warning.

Referenced by Verify().

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

◆ CheckBlackboardKeys()

void Olympe::VSGraphVerifier::CheckBlackboardKeys ( const TaskGraphTemplate g,
VSVerificationResult r 
)
staticprivate

Definition at line 492 of file VSGraphVerifier.cpp.

References AddIssue(), Olympe::Error, Olympe::GetBBValue, GetComponentTypeID_Static(), Olympe::TaskNodeDefinition::NodeID, and Olympe::SetBBValue.

Referenced by Verify().

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

◆ CheckBlackboardTypes()

void Olympe::VSGraphVerifier::CheckBlackboardTypes ( const TaskGraphTemplate g,
VSVerificationResult r 
)
staticprivate

Definition at line 534 of file VSGraphVerifier.cpp.

References AddIssue(), Olympe::Error, Olympe::GetBBValue, GetComponentTypeID_Static(), Olympe::None, Olympe::DataPinDefinition::PinName, and Olympe::SetBBValue.

Referenced by Verify().

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

◆ CheckConditionIDs()

void Olympe::VSGraphVerifier::CheckConditionIDs ( const TaskGraphTemplate g,
VSVerificationResult r 
)
staticprivate

Definition at line 835 of file VSGraphVerifier.cpp.

References AddIssue(), Olympe::Branch, Olympe::Error, Olympe::ConditionRegistry::Get(), GetComponentTypeID_Static(), Olympe::TaskNodeDefinition::NodeID, and Olympe::While.

Referenced by Verify().

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

◆ CheckConditionParams()

void Olympe::VSGraphVerifier::CheckConditionParams ( const TaskGraphTemplate g,
VSVerificationResult r 
)
staticprivate

Definition at line 943 of file VSGraphVerifier.cpp.

References AddIssue(), Olympe::Branch, Olympe::Error, Olympe::ConditionRegistry::Get(), GetComponentTypeID_Static(), Olympe::ConditionParamSpec::name, and Olympe::While.

Referenced by Verify().

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

◆ CheckConditionStructure()

void Olympe::VSGraphVerifier::CheckConditionStructure ( const TaskGraphTemplate g,
VSVerificationResult r 
)
staticprivate

Definition at line 1023 of file VSGraphVerifier.cpp.

References AddIssue(), Olympe::Branch, Olympe::Error, Olympe::Float, GetComponentTypeID_Static(), Olympe::Int, Olympe::None, Olympe::Warning, and Olympe::While.

Referenced by Verify().

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

◆ CheckDanglingNodes()

void Olympe::VSGraphVerifier::CheckDanglingNodes ( const TaskGraphTemplate g,
VSVerificationResult r 
)
staticprivate

Definition at line 163 of file VSGraphVerifier.cpp.

References AddIssue(), Olympe::EntryPoint, Olympe::Error, Olympe::GetBBValue, GetComponentTypeID_Static(), and Olympe::MathOp.

Referenced by Verify().

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

◆ CheckDataPinTypes()

void Olympe::VSGraphVerifier::CheckDataPinTypes ( const TaskGraphTemplate g,
VSVerificationResult r 
)
staticprivate

Definition at line 364 of file VSGraphVerifier.cpp.

References AddIssue(), Olympe::TaskNodeDefinition::DataPins, Olympe::Error, GetComponentTypeID_Static(), and Olympe::None.

Referenced by Verify().

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

◆ CheckEntryPoint()

void Olympe::VSGraphVerifier::CheckEntryPoint ( const TaskGraphTemplate g,
VSVerificationResult r 
)
staticprivate

Definition at line 133 of file VSGraphVerifier.cpp.

References AddIssue(), Olympe::EntryPoint, Olympe::Error, and GetComponentTypeID_Static().

Referenced by Verify().

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

◆ CheckExecCycles()

void Olympe::VSGraphVerifier::CheckExecCycles ( const TaskGraphTemplate g,
VSVerificationResult r 
)
staticprivate

Definition at line 210 of file VSGraphVerifier.cpp.

References AddIssue(), Olympe::Error, and GetComponentTypeID_Static().

Referenced by Verify().

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

◆ CheckExecPinTypes()

void Olympe::VSGraphVerifier::CheckExecPinTypes ( const TaskGraphTemplate g,
VSVerificationResult r 
)
staticprivate

Definition at line 329 of file VSGraphVerifier.cpp.

References AddIssue(), Olympe::Error, GetComponentTypeID_Static(), and Olympe::ExecPinConnection::SourceNodeID.

Referenced by Verify().

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

◆ CheckMathOperators()

void Olympe::VSGraphVerifier::CheckMathOperators ( const TaskGraphTemplate g,
VSVerificationResult r 
)
staticprivate

Definition at line 864 of file VSGraphVerifier.cpp.

References AddIssue(), Olympe::Error, GetComponentTypeID_Static(), Olympe::OperatorRegistry::IsValidMathOperator(), Olympe::MathOp, and Olympe::TaskNodeDefinition::NodeID.

Referenced by Verify().

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

◆ CheckNodeParameterWarnings()

void Olympe::VSGraphVerifier::CheckNodeParameterWarnings ( const TaskGraphTemplate g,
VSVerificationResult r 
)
staticprivate

Definition at line 657 of file VSGraphVerifier.cpp.

References AddIssue(), Olympe::AtomicTask, Olympe::Delay, GetComponentTypeID_Static(), Olympe::Literal, Olympe::MathOp, Olympe::TaskNodeDefinition::NodeID, Olympe::SubGraph, and Olympe::Warning.

Referenced by Verify().

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

◆ CheckPinDirections()

void Olympe::VSGraphVerifier::CheckPinDirections ( const TaskGraphTemplate g,
VSVerificationResult r 
)
staticprivate

Definition at line 425 of file VSGraphVerifier.cpp.

References AddIssue(), Olympe::TaskNodeDefinition::DataPins, Olympe::Error, GetComponentTypeID_Static(), Olympe::Input, and Olympe::Output.

Referenced by Verify().

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

◆ CheckReachability()

void Olympe::VSGraphVerifier::CheckReachability ( const TaskGraphTemplate g,
VSVerificationResult r 
)
staticprivate

Definition at line 732 of file VSGraphVerifier.cpp.

References AddIssue(), Olympe::EntryPoint, Olympe::GetBBValue, GetComponentTypeID_Static(), Olympe::Info, Olympe::MathOp, and Olympe::TaskNodeDefinition::NodeID.

Referenced by Verify().

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

◆ CheckSubGraphCircular()

void Olympe::VSGraphVerifier::CheckSubGraphCircular ( const TaskGraphTemplate g,
VSVerificationResult r 
)
staticprivate

Definition at line 301 of file VSGraphVerifier.cpp.

References AddIssue(), Olympe::Error, GetComponentTypeID_Static(), Olympe::TaskNodeDefinition::NodeID, and Olympe::SubGraph.

Referenced by Verify().

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

◆ CheckSubGraphPaths()

void Olympe::VSGraphVerifier::CheckSubGraphPaths ( const TaskGraphTemplate g,
VSVerificationResult r 
)
staticprivate

Definition at line 891 of file VSGraphVerifier.cpp.

References AddIssue(), Olympe::Error, GetComponentTypeID_Static(), Olympe::Literal, Olympe::SubGraph, Olympe::TaskNodeDefinition::SubGraphPath, and SYSTEM_LOG.

Referenced by Verify().

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

◆ CheckSwitchNodes()

void Olympe::VSGraphVerifier::CheckSwitchNodes ( const TaskGraphTemplate g,
VSVerificationResult r 
)
staticprivate

Definition at line 594 of file VSGraphVerifier.cpp.

References AddIssue(), Olympe::Error, GetComponentTypeID_Static(), Olympe::TaskNodeDefinition::NodeID, Olympe::Switch, and Olympe::SwitchCaseDefinition::value.

Referenced by Verify().

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

◆ Verify()

VSVerificationResult Olympe::VSGraphVerifier::Verify ( const TaskGraphTemplate graph)
static

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