5#include <libxml/parser.h>
6#include <libxml/tree.h>
Represents a complete behavior tree data structure.
Represents a blackboard containing multiple entries.
void SerializeAttributes(Node *node, xmlNodePtr xml_node)
Serialize node attributes.
LibXMLBehaviorTreeSerializer(const ParserConfig &config)
Constructor with parser configuration.
~LibXMLBehaviorTreeSerializer()
Destructor.
std::vector< SerializeError > errors_
EmberCore::String SerializeToString(std::shared_ptr< BehaviorTree > tree)
Serialize behavior tree to string.
EmberCore::String GetElementNameForNode(Node *node) const
Get node element name based on node type and config.
void SetConfig(const ParserConfig &config)
xmlDocPtr CreateXMLDocument(std::shared_ptr< BehaviorTree > tree)
Create XML document from behavior tree.
xmlNodePtr SerializeBehaviorTree(std::shared_ptr< BehaviorTree > tree, xmlNodePtr parent)
Serialize a single behavior tree to XML node.
const std::vector< SerializeError > & GetErrors() const
bool HasErrors() const
Error handling.
xmlNodePtr SerializeNode(Node *node, xmlNodePtr parent)
Recursively serialize a node and its children.
bool SerializeToFile(std::shared_ptr< BehaviorTree > tree, const EmberCore::String &filepath)
Serialize behavior tree to file.
void AddError(SerializeError::Type type, const EmberCore::String &message)
Error handling.
xmlNodePtr SerializeBlackboard(Blackboard *blackboard, xmlNodePtr parent)
Serialize blackboard.
const ParserConfig & GetConfig() const
Configuration management.
Represents a node in a behavior tree structure.
Configuration for XML parser behavior and element/attribute mappings.
Main types header for EmberCore.
std::string String
Framework-agnostic string type.
EmberCore::String message
SerializeError(Type t, const EmberCore::String &msg)