![]() |
Olympe Engine 2.0
2D Game Engine with ECS Architecture
|
BlueprintValidator - Validates node graphs against catalogs Ensures type safety and parameter consistency Also provides JSON schema validation and normalization. More...
#include <BlueprintValidator.h>
Public Member Functions | |
| BlueprintValidator () | |
| ~BlueprintValidator () | |
| std::vector< ValidationError > | ValidateGraph (const NodeGraph *graph) |
| std::vector< ValidationError > | ValidateNode (const NodeGraph *graph, int nodeId) |
| bool | IsGraphValid (const NodeGraph *graph) |
| int | GetErrorCount (const std::vector< ValidationError > &errors, ErrorSeverity severity) const |
| std::string | DetectType (const nlohmann::json &blueprint) |
| bool | Normalize (nlohmann::json &blueprint) |
| bool | ValidateJSON (const nlohmann::json &blueprint, std::string &errors) |
Static Public Member Functions | |
| static const char * | SeverityToString (ErrorSeverity severity) |
| static ImVec4 | SeverityToColor (ErrorSeverity severity) |
Private Member Functions | |
| void | ValidateNodeType (const NodeGraph *graph, const GraphNode *node, std::vector< ValidationError > &errors) |
| void | ValidateNodeParameters (const NodeGraph *graph, const GraphNode *node, std::vector< ValidationError > &errors) |
| void | ValidateNodeLinks (const NodeGraph *graph, const GraphNode *node, std::vector< ValidationError > &errors) |
| bool | ValidateBehaviorTree (const nlohmann::json &blueprint, std::string &errors) |
| bool | ValidateHFSM (const nlohmann::json &blueprint, std::string &errors) |
| bool | ValidateEntityPrefab (const nlohmann::json &blueprint, std::string &errors) |
| bool | ValidateUIBlueprint (const nlohmann::json &blueprint, std::string &errors) |
| bool | ValidateLevel (const nlohmann::json &blueprint, std::string &errors) |
BlueprintValidator - Validates node graphs against catalogs Ensures type safety and parameter consistency Also provides JSON schema validation and normalization.
Definition at line 48 of file BlueprintValidator.h.
| Olympe::BlueprintValidator::BlueprintValidator | ( | ) |
Definition at line 12 of file BlueprintValidator.cpp.
| Olympe::BlueprintValidator::~BlueprintValidator | ( | ) |
Definition at line 16 of file BlueprintValidator.cpp.
| std::string Olympe::BlueprintValidator::DetectType | ( | const nlohmann::json & | blueprint | ) |
Definition at line 294 of file BlueprintValidator.cpp.
References GetComponentTypeID_Static().
Referenced by Normalize().
Here is the call graph for this function:
Here is the caller graph for this function:| int Olympe::BlueprintValidator::GetErrorCount | ( | const std::vector< ValidationError > & | errors, |
| ErrorSeverity | severity | ||
| ) | const |
Definition at line 90 of file BlueprintValidator.cpp.
References GetComponentTypeID_Static().
Referenced by Olympe::ValidationPanel::RenderErrorSummary().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 74 of file BlueprintValidator.cpp.
References Olympe::Critical, Olympe::Error, GetComponentTypeID_Static(), and ValidateGraph().
Here is the call graph for this function:| bool Olympe::BlueprintValidator::Normalize | ( | nlohmann::json & | blueprint | ) |
Definition at line 359 of file BlueprintValidator.cpp.
References DetectType(), and GetComponentTypeID_Static().
Here is the call graph for this function:
|
static |
Definition at line 113 of file BlueprintValidator.cpp.
References Olympe::Critical, Olympe::Error, GetComponentTypeID_Static(), Olympe::Info, and Olympe::Warning.
Referenced by Olympe::ValidationPanel::RenderErrorList(), and Olympe::ValidationPanel::RenderErrorSummary().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 101 of file BlueprintValidator.cpp.
References Olympe::Critical, Olympe::Error, Olympe::Info, and Olympe::Warning.
Referenced by Olympe::ValidationPanel::RenderErrorList().
Here is the caller graph for this function:
|
private |
Definition at line 451 of file BlueprintValidator.cpp.
References GetComponentTypeID_Static().
Referenced by ValidateJSON().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 501 of file BlueprintValidator.cpp.
References GetComponentTypeID_Static().
Referenced by ValidateJSON().
Here is the call graph for this function:
Here is the caller graph for this function:| std::vector< ValidationError > Olympe::BlueprintValidator::ValidateGraph | ( | const NodeGraph * | graph | ) |
Definition at line 20 of file BlueprintValidator.cpp.
References Olympe::Critical, GetComponentTypeID_Static(), ValidateNodeLinks(), ValidateNodeParameters(), ValidateNodeType(), and Olympe::Warning.
Referenced by IsGraphValid(), and Olympe::ValidationPanel::ValidateActiveGraph().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 476 of file BlueprintValidator.cpp.
References GetComponentTypeID_Static().
Referenced by ValidateJSON().
Here is the call graph for this function:
Here is the caller graph for this function:| bool Olympe::BlueprintValidator::ValidateJSON | ( | const nlohmann::json & | blueprint, |
| std::string & | errors | ||
| ) |
Definition at line 412 of file BlueprintValidator.cpp.
References GetComponentTypeID_Static(), ValidateBehaviorTree(), ValidateEntityPrefab(), ValidateHFSM(), ValidateLevel(), and ValidateUIBlueprint().
Here is the call graph for this function:
|
private |
Definition at line 532 of file BlueprintValidator.cpp.
References GetComponentTypeID_Static().
Referenced by ValidateJSON().
Here is the call graph for this function:
Here is the caller graph for this function:| std::vector< ValidationError > Olympe::BlueprintValidator::ValidateNode | ( | const NodeGraph * | graph, |
| int | nodeId | ||
| ) |
Definition at line 49 of file BlueprintValidator.cpp.
References Olympe::Critical, GetComponentTypeID_Static(), ValidateNodeLinks(), ValidateNodeParameters(), and ValidateNodeType().
Here is the call graph for this function:
|
private |
Definition at line 250 of file BlueprintValidator.cpp.
References Olympe::BT_Decorator, Olympe::BT_Selector, Olympe::BT_Sequence, Olympe::Error, GetComponentTypeID_Static(), and Olympe::Warning.
Referenced by ValidateGraph(), and ValidateNode().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 181 of file BlueprintValidator.cpp.
References Olympe::BT_Action, Olympe::BT_Condition, Olympe::BT_Decorator, Olympe::Error, Olympe::EnumCatalogManager::FindActionType(), Olympe::EnumCatalogManager::FindConditionType(), Olympe::EnumCatalogManager::FindDecoratorType(), Olympe::EnumCatalogManager::Get(), GetComponentTypeID_Static(), and Olympe::CatalogType::parameters.
Referenced by ValidateGraph(), and ValidateNode().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 125 of file BlueprintValidator.cpp.
References Olympe::BT_Action, Olympe::BT_Condition, Olympe::BT_Decorator, Olympe::Error, Olympe::EnumCatalogManager::Get(), and GetComponentTypeID_Static().
Referenced by ValidateGraph(), and ValidateNode().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 520 of file BlueprintValidator.cpp.
References GetComponentTypeID_Static().
Referenced by ValidateJSON().
Here is the call graph for this function:
Here is the caller graph for this function: