6#include <nlohmann/json.hpp>
136 nlohmann::json
ToJson()
const;
137 void FromJson(
const nlohmann::json &json);
144 std::shared_ptr<BehaviorTreeProject>
Clone(
const String &new_name =
"")
const;
void SetName(const String &name)
void UpdateModifiedTimestamp()
String MakeRelativePath(const String &absolute_path) const
String GetDescription() const
String project_filepath_
Path to the project file itself.
std::shared_ptr< BehaviorTreeProject > Clone(const String &new_name="") const
const std::map< String, TreeImplementationStatus > & GetTreeImplementationStatuses() const
String GetProjectFilePath() const
void SetVersion(const String &version)
std::map< String, TreeImplementationStatus > tree_statuses_
bool AddResource(const String &filepath)
bool LoadFromFile(const String &filepath)
String GetVersion() const
ProjectValidationReport ValidateWithParser(class LibXMLBehaviorTreeParser *parser) const
String GetParserProfileName() const
std::vector< String > GetImplementedTrees() const
int64_t created_timestamp_
~BehaviorTreeProject()=default
ResourceValidationStatus ValidateSingleResource(const String &filepath) const
void SetParserProfileName(const String &profile_name)
static int64_t GetCurrentTimestamp()
void SetTreeImplementationStatus(const std::map< String, TreeImplementationStatus > &statuses)
std::vector< String > GetUnimplementedReferences() const
bool SaveToFile(const String &filepath)
void FromJson(const nlohmann::json &json)
static std::shared_ptr< BehaviorTreeProject > CreateEmpty(const String &name)
bool HasResource(const String &filepath) const
const std::vector< String > & GetResources() const
int64_t GetModifiedTimestamp() const
int64_t GetCreatedTimestamp() const
String parser_profile_name_
Name of the parser profile to use.
nlohmann::json ToJson() const
bool RemoveResource(const String &filepath)
void SetProjectFilePath(const String &filepath)
size_t GetResourceCount() const
ProjectValidationReport ValidateResources() const
bool IsTreeImplemented(const String &tree_id) const
std::vector< String > resources_
List of XML file paths (relative to project file)
String ResolveResourcePath(const String &resource_path) const
void SetDescription(const String &description)
String GetBaseDirectory() const
int64_t modified_timestamp_
Thread-safe XML parser using libxml2 for behavior tree files.
Main types header for EmberCore.
std::string String
Framework-agnostic string type.
Complete validation report for a project.
std::vector< String > unresolved_blackboard_includes
Blackboard includes not found in project.
std::vector< String > warnings
Project-level warnings.
std::vector< ResourceValidationStatus > resource_statuses
Status for each resource.
std::vector< String > unimplemented_trees
Trees referenced but not implemented.
int GetValidFileCount() const
int GetTotalTreeCount() const
std::vector< String > errors
Project-level errors.
std::vector< String > duplicate_blackboard_ids
Duplicate blackboard IDs across files.
bool is_valid
Overall validation status.
int GetImplementedTreeCount() const
std::vector< String > circular_references
Circular reference chains detected.
String GenerateReport() const
std::map< String, TreeImplementationStatus > tree_statuses
Status for each tree.
Resource validation status for a single file.
int blackboard_count
Number of blackboards found in the file.
String filepath
Path to the file.
std::vector< String > blackboard_ids
IDs of blackboards found in the file.
std::vector< String > errors
Validation errors for this file.
bool exists
File exists on disk.
bool is_valid_xml
File is valid XML.
std::vector< String > tree_ids
IDs of trees found in the file.
std::vector< String > blackboard_includes
IDs referenced via includes="..." attribute.
int tree_count
Number of trees found in the file.
bool has_behavior_trees
File contains BehaviorTree elements.
std::vector< String > subtree_refs
IDs of SubTrees referenced in this file.
std::vector< String > warnings
Validation warnings for this file.
bool has_blackboards
File contains Blackboard elements.
TreeImplementationStatus()=default
TreeImplementationStatus(const String &id)
String tree_id
Tree identifier.
String defined_in_file
Which file defines this tree (empty if not defined)
bool has_root_node
Whether tree has a root node.
bool is_implemented
Has actual implementation (not just empty/placeholder)
std::vector< String > referenced_in_files
Which files reference this tree via SubTree.