53#include "../json_helper.h"
122 static bool FileExists(
const std::string& path);
159 const std::string& graphType,
195 std::unordered_map<std::string, ParameterBinding>&
outParams);
202 const std::string& graphType,
ComponentTypeID GetComponentTypeID_Static()
Immutable asset structure shared by all task graph runners.
Static utility that loads TaskGraphTemplate from schema v4 JSON.
static ExecPinRole StringToExecPinRole(const std::string &s)
static DataPinDir StringToDataPinDir(const std::string &s)
static TaskNodeDefinition ParseNodeV4(const json &nodeJson, const std::string &graphType, std::vector< std::string > &outErrors)
Parses a single node JSON (v4 flat format) into a TaskNodeDefinition.
static TaskNodeType StringToNodeType(const std::string &s, const std::string &graphType, bool &outOk)
static bool ValidateJson(const json &data, std::vector< std::string > &outErrors)
Validates a JSON object against the expected task graph schema.
static void ParseDataConnectionsV4(const json &root, TaskGraphTemplate *tmpl)
Parses dataConnections (v4) and fills tmpl->DataConnections.
static VariableType StringToVariableType(const std::string &s)
static TaskGraphTemplate * LoadFromFile(const std::string &path, std::vector< std::string > &outErrors)
Loads a TaskGraphTemplate from a JSON file on disk.
static std::vector< std::string > ScanTaskGraphDirectory(const std::string &dir)
Recursively scans a directory for .ats task graph files.
static bool FileExists(const std::string &path)
Returns true if the given file path exists and can be opened.
static int ResolveRootNodeId(const json &data, const json &dataSection)
static TaskGraphTemplate * ParseSchemaV4(const json &data, std::vector< std::string > &outErrors)
Parses a schema v4 flat JSON into a TaskGraphTemplate.
static bool GetChildValue(const json &obj, const std::string &key, json &outVal)
static void ParseExecConnectionsV4(const json &root, TaskGraphTemplate *tmpl)
Parses execConnections (v4) and fills tmpl->ExecConnections.
static TaskValue ParsePrimitiveValue(const json &val)
static void ParseBlackboardV4(const json &root, TaskGraphTemplate *tmpl, std::vector< std::string > &outErrors)
Parses the blackboard array (v4) and fills tmpl->Blackboard.
static void ParseParameters(const json ¶msJson, std::unordered_map< std::string, ParameterBinding > &outParams)
static TaskGraphTemplate * LoadFromJson(const json &data, std::vector< std::string > &outErrors)
Loads a TaskGraphTemplate from an already-parsed JSON object.
Immutable, shareable task graph asset.
C++14-compliant type-safe value container for task parameters.
< Provides AssetID and INVALID_ASSET_ID
VariableType
Type tags used by TaskValue to identify stored data.
TaskNodeType
Identifies the role of a node in the task graph.
DataPinDir
Direction of a data pin on a Visual Script node.
ExecPinRole
Role of an exec pin on a Visual Script node.
Full description of a single node in the task graph.