![]() |
Olympe Engine 2.0
2D Game Engine with ECS Architecture
|
Static validator for BT graph documents. More...
#include <BTGraphValidator.h>
Static Public Member Functions | |
| static std::vector< BTValidationMessage > | ValidateGraph (const NodeGraph::GraphDocument *graph) |
| Validate a complete BT graph. | |
Static Private Member Functions | |
| static void | ValidateRootNode (const NodeGraph::GraphDocument *graph, std::vector< BTValidationMessage > &messages) |
| Rule 1: Check for exactly one root node. | |
| static void | ValidateCycles (const NodeGraph::GraphDocument *graph, std::vector< BTValidationMessage > &messages) |
| Rule 2: Detect cycles in graph. | |
| static void | ValidateChildrenCount (const NodeGraph::GraphDocument *graph, std::vector< BTValidationMessage > &messages) |
| Rule 3: Validate child counts per node type. | |
| static void | ValidateOrphans (const NodeGraph::GraphDocument *graph, std::vector< BTValidationMessage > &messages) |
| Rule 4: Check for orphan nodes (disconnected from root) | |
| static void | ValidateNodeTypes (const NodeGraph::GraphDocument *graph, std::vector< BTValidationMessage > &messages) |
| Rule 5: Validate node types are registered. | |
Static validator for BT graph documents.
Validates graph structure according to BT-specific rules. Returns list of validation messages (errors, warnings, info). Graph is valid if no error-level messages are returned.
Definition at line 56 of file BTGraphValidator.h.
|
staticprivate |
Rule 3: Validate child counts per node type.
| graph | Graph to validate |
| messages | Output messages |
Definition at line 158 of file BTGraphValidator.cpp.
References Olympe::AI::Error, Olympe::AI::BTNodeRegistry::Get(), and GetComponentTypeID_Static().
Referenced by ValidateGraph().
Here is the call graph for this function:
Here is the caller graph for this function:
|
staticprivate |
Rule 2: Detect cycles in graph.
| graph | Graph to validate |
| messages | Output messages |
Definition at line 92 of file BTGraphValidator.cpp.
References Olympe::AI::Error, and GetComponentTypeID_Static().
Referenced by ValidateGraph().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Validate a complete BT graph.
| graph | Graph document to validate |
Definition at line 17 of file BTGraphValidator.cpp.
References Olympe::AI::Error, GetComponentTypeID_Static(), ValidateChildrenCount(), ValidateCycles(), ValidateNodeTypes(), ValidateOrphans(), and ValidateRootNode().
Referenced by Olympe::AI::BTGraphCompiler::Compile(), Test3_ValidationValidRoot(), Test4_ValidationMultipleRoots(), Test5_ValidationCycle(), Test6_ValidateGraph(), and Test8_ValidationChildrenCount().
Here is the call graph for this function:
Here is the caller graph for this function:
|
staticprivate |
Rule 5: Validate node types are registered.
| graph | Graph to validate |
| messages | Output messages |
Definition at line 283 of file BTGraphValidator.cpp.
References Olympe::AI::Error, Olympe::AI::BTNodeRegistry::Get(), and GetComponentTypeID_Static().
Referenced by ValidateGraph().
Here is the call graph for this function:
Here is the caller graph for this function:
|
staticprivate |
Rule 4: Check for orphan nodes (disconnected from root)
| graph | Graph to validate |
| messages | Output messages |
Definition at line 198 of file BTGraphValidator.cpp.
References GetComponentTypeID_Static(), and Olympe::AI::Warning.
Referenced by ValidateGraph().
Here is the call graph for this function:
Here is the caller graph for this function:
|
staticprivate |
Rule 1: Check for exactly one root node.
| graph | Graph to validate |
| messages | Output messages |
Definition at line 40 of file BTGraphValidator.cpp.
References Olympe::AI::Error, and GetComponentTypeID_Static().
Referenced by ValidateGraph().
Here is the call graph for this function:
Here is the caller graph for this function: