subtree_node.cpp
Go to the documentation of this file.
2 
3 
4 BT::SubtreeNode::SubtreeNode(const std::string &name) :
5  DecoratorNode(name, {} )
6 {
7  setRegistrationID("SubTree");
8 }
9 
11 {
12  NodeStatus prev_status = status();
13  if (prev_status == NodeStatus::IDLE)
14  {
16  }
17  return child_node_->executeTick();
18 }
19 
20 
21 //--------------------------------
23  DecoratorNode(name, {} )
24 {
25  setRegistrationID("SubTreePlus");
26 }
27 
29 {
30  NodeStatus prev_status = status();
31  if (prev_status == NodeStatus::IDLE)
32  {
34  }
35  return child_node_->executeTick();
36 }
37 
const std::string & name() const
Name of the instance, not the type.
Definition: tree_node.cpp:73
virtual BT::NodeStatus tick() override
Method to be implemented by the user.
virtual BT::NodeStatus tick() override
Method to be implemented by the user.
SubtreePlusNode(const std::string &name)
TreeNode * child_node_
SubtreeNode(const std::string &name)
Definition: subtree_node.cpp:4
void setRegistrationID(StringView ID)
Definition: tree_node.h:163
NodeStatus status() const
Definition: tree_node.cpp:56
NodeStatus
Definition: basic_types.h:35
virtual BT::NodeStatus executeTick()
The method that should be used to invoke tick() and setStatus();.
Definition: tree_node.cpp:33
void setStatus(NodeStatus new_status)
Definition: tree_node.cpp:40


behaviotree_cpp_v3
Author(s): Michele Colledanchise, Davide Faconti
autogenerated on Tue May 4 2021 02:56:25