BehaviorTree
Core Library to create and execute Behavior Trees
Loading...
Searching...
No Matches
BT::XMLParser Class Reference

The XMLParser is a class used to read the model of a BehaviorTree from file or text and instantiate the corresponding tree using the BehaviorTreeFactory. More...

#include <xml_parsing.h>

Inheritance diagram for BT::XMLParser:
Collaboration diagram for BT::XMLParser:

Public Member Functions

 XMLParser (const BehaviorTreeFactory &factory)
 
 XMLParser (const XMLParser &other)=delete
 
XMLParseroperator= (const XMLParser &other)=delete
 
 XMLParser (XMLParser &&other) noexcept
 
XMLParseroperator= (XMLParser &&other) noexcept
 
void loadFromFile (const std::filesystem::path &filename, bool add_includes=true) override
 
void loadFromText (const std::string &xml_text, bool add_includes=true) override
 
std::vector< std::string > registeredBehaviorTrees () const override
 
Tree instantiateTree (const Blackboard::Ptr &root_blackboard, std::string main_tree_to_execute={}) override
 
void clearInternalState () override
 
- Public Member Functions inherited from BT::Parser
 Parser (const Parser &other)=delete
 
Parseroperator= (const Parser &other)=delete
 
 Parser (Parser &&other)=default
 
Parseroperator= (Parser &&other)=default
 
virtual void loadFromFile (const std::filesystem::path &filename, bool add_includes=true)=0
 
virtual void loadFromText (const std::string &xml_text, bool add_includes=true)=0
 
virtual std::vector< std::string > registeredBehaviorTrees () const =0
 
virtual Tree instantiateTree (const Blackboard::Ptr &root_blackboard, std::string tree_name={})=0
 
virtual void clearInternalState ()
 

Detailed Description

The XMLParser is a class used to read the model of a BehaviorTree from file or text and instantiate the corresponding tree using the BehaviorTreeFactory.

Member Function Documentation

◆ clearInternalState()

void BT::XMLParser::clearInternalState ( )
overridevirtual

Reimplemented from BT::Parser.

◆ instantiateTree()

Tree BT::XMLParser::instantiateTree ( const Blackboard::Ptr &  root_blackboard,
std::string  main_tree_to_execute = {} 
)
overridevirtual

Implements BT::Parser.

◆ loadFromFile()

void BT::XMLParser::loadFromFile ( const std::filesystem::path &  filename,
bool  add_includes = true 
)
overridevirtual

Implements BT::Parser.

◆ loadFromText()

void BT::XMLParser::loadFromText ( const std::string &  xml_text,
bool  add_includes = true 
)
overridevirtual

Implements BT::Parser.

◆ registeredBehaviorTrees()

std::vector< std::string > BT::XMLParser::registeredBehaviorTrees ( ) const
overridevirtual

Implements BT::Parser.


The documentation for this class was generated from the following file: