![]() |
Olympe Engine 2.0
2D Game Engine with ECS Architecture
|
Converts task graph JSON from schema v3 to schema v4 (VisualScript). More...
#include <TaskGraphMigrator_v3_to_v4.h>
Static Public Member Functions | |
| static bool | Migrate (const std::string &inputPath, const std::string &outputPath, std::vector< std::string > &outErrors) |
| Migrates a v3 JSON file to v4 and writes the result to disk. | |
| static json | MigrateJson (const json &v3data, std::vector< std::string > &outErrors) |
| Performs the v3->v4 JSON transformation in memory. | |
Converts task graph JSON from schema v3 to schema v4 (VisualScript).
Migration rules applied by MigrateJson():
schema_version == 3; adds error and returns {} if not.name, description, blackboard / localBlackboard.nodes:NextOnSuccess != -1: adds an ExecConnection { NodeID, "Out", NextOnSuccess, "In" }.NextOnFailure != -1: adds an ExecConnection { NodeID, "OutFailure", NextOnFailure, "In" }.nodeType, nodeID, nodeName, parameters).NextOnSuccess / NextOnFailure from the output node object."graphType": "VisualScript" and "schema_version": 4."DataConnections": [] array. Definition at line 58 of file TaskGraphMigrator_v3_to_v4.h.
|
static |
Migrates a v3 JSON file to v4 and writes the result to disk.
| inputPath | Path to the v3 JSON file to read. |
| outputPath | Path where the v4 JSON file will be written. |
| outErrors | Receives human-readable error descriptions on failure. |
Definition at line 22 of file TaskGraphMigrator_v3_to_v4.cpp.
References GetComponentTypeID_Static(), MigrateJson(), and SYSTEM_LOG.
Here is the call graph for this function:
|
static |
Performs the v3->v4 JSON transformation in memory.
| v3data | Parsed JSON object representing the v3 graph. |
| outErrors | Receives human-readable error descriptions on failure. |
{} on error. Definition at line 81 of file TaskGraphMigrator_v3_to_v4.cpp.
References GetComponentTypeID_Static(), and SYSTEM_LOG.
Referenced by Olympe::TaskGraphLoader::LoadFromJson(), and Migrate().
Here is the call graph for this function:
Here is the caller graph for this function: