9#include <memory_resource>
16 explicit Node(
const std::pmr::vector<Node*> &
parent = {},
const std::pmr::vector<Node*> &child = {}) :
parent(
parent),
children(child) {}
17 virtual ~Node() =
default;
18 virtual bool enabled() = 0;
19 virtual void action() = 0;
27 child->
parent.push_back(
this);
void addChild(Node *child)
attach a child node to the current node
Definition Node.h:25
std::pmr::vector< Node * > parent
List of parents node of the current node.
Definition Node.h:38
bool isTransition
true if the current node is a transition
Definition Node.h:31
bool synchronize
true if the current node needs to wait for all its parent to be enabled before executing
Definition Node.h:33
bool active
true if the node is currently active
Definition Node.h:35
std::pmr::vector< Node * > children
List of children node of the current node.
Definition Node.h:40
Definition StateMachine.h:12