The SimpleConditionNode provides an easy to use ConditionNode. The user should simply provide a callback with this signature. More...
#include <condition_node.h>
Public Types | |
typedef std::function < NodeStatus(TreeNode &)> | TickFunctor |
Public Member Functions | |
SimpleConditionNode (const std::string &name, TickFunctor tick_functor, const NodeConfiguration &config) | |
~SimpleConditionNode () override | |
Protected Member Functions | |
virtual NodeStatus | tick () override |
Method to be implemented by the user. | |
Protected Attributes | |
TickFunctor | tick_functor_ |
The SimpleConditionNode provides an easy to use ConditionNode. The user should simply provide a callback with this signature.
BT::NodeStatus functionName(void)
This avoids the hassle of inheriting from a ActionNode.
Using lambdas or std::bind it is easy to pass a pointer to a method. SimpleConditionNode does not support halting, NodeParameters, nor Blackboards.
Definition at line 52 of file condition_node.h.
typedef std::function<NodeStatus(TreeNode&)> BT::SimpleConditionNode::TickFunctor |
Definition at line 55 of file condition_node.h.
BT::SimpleConditionNode::SimpleConditionNode | ( | const std::string & | name, |
TickFunctor | tick_functor, | ||
const NodeConfiguration & | config | ||
) |
Definition at line 23 of file condition_node.cpp.
BT::SimpleConditionNode::~SimpleConditionNode | ( | ) | [override] |
NodeStatus BT::SimpleConditionNode::tick | ( | ) | [override, protected, virtual] |
Method to be implemented by the user.
Implements BT::TreeNode.
Definition at line 29 of file condition_node.cpp.
TickFunctor BT::SimpleConditionNode::tick_functor_ [protected] |
Definition at line 66 of file condition_node.h.