bt_parser.h
Go to the documentation of this file.
1 /* Copyright (C) 2022 Davide Faconti - All Rights Reserved
2 *
3 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),
4 * to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
5 * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6 * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
9 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
10 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
11 */
12 
13 #pragma once
14 
17 
18 namespace BT
19 {
25 class Parser
26 {
27 public:
28  Parser() = default;
29 
30  virtual ~Parser() = default;
31 
32  Parser(const Parser& other) = delete;
33  Parser& operator=(const Parser& other) = delete;
34 
35  virtual void loadFromFile(const std::string& filename, bool add_includes = true) = 0;
36 
37  virtual void loadFromText(const std::string& xml_text, bool add_includes = true) = 0;
38 
39  virtual std::vector<std::string> registeredBehaviorTrees() const = 0;
40 
41  virtual Tree instantiateTree(const Blackboard::Ptr& root_blackboard,
42  std::string tree_name = {}) = 0;
43 
44  virtual void clearInternalState() {};
45 };
46 
47 } // namespace BT
virtual std::vector< std::string > registeredBehaviorTrees() const =0
virtual void clearInternalState()
Definition: bt_parser.h:44
The BehaviorTreeParser is a class used to read the model of a BehaviorTree from file or text and inst...
Definition: bt_parser.h:25
Parser()=default
std::shared_ptr< Blackboard > Ptr
Definition: blackboard.h:25
Parser & operator=(const Parser &other)=delete
static const char * xml_text
virtual void loadFromText(const std::string &xml_text, bool add_includes=true)=0
virtual Tree instantiateTree(const Blackboard::Ptr &root_blackboard, std::string tree_name={})=0
Struct used to store a tree. If this object goes out of scope, the tree is destroyed.
Definition: bt_factory.h:125
virtual ~Parser()=default
virtual void loadFromFile(const std::string &filename, bool add_includes=true)=0


behaviortree_cpp_v3
Author(s): Michele Colledanchise, Davide Faconti
autogenerated on Mon Jul 3 2023 02:50:14