Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
BT::SimpleActionNode Class Reference

The SimpleActionNode provides an easy to use SyncActionNode. The user should simply provide a callback with this signature. More...

#include <action_node.h>

Inheritance diagram for BT::SimpleActionNode:
Inheritance graph
[legend]

List of all members.

Public Types

typedef std::function
< NodeStatus(TreeNode &)> 
TickFunctor

Public Member Functions

 SimpleActionNode (const std::string &name, TickFunctor tick_functor, const NodeConfiguration &config)
 ~SimpleActionNode () override

Protected Member Functions

virtual NodeStatus tick () override final
 Method to be implemented by the user.

Protected Attributes

TickFunctor tick_functor_

Detailed Description

The SimpleActionNode provides an easy to use SyncActionNode. The user should simply provide a callback with this signature.

BT::NodeStatus functionName(TreeNode&)

This avoids the hassle of inheriting from a ActionNode.

Using lambdas or std::bind it is easy to pass a pointer to a method. SimpleActionNode is executed synchronously and does not support halting. NodeParameters aren't supported.

Definition at line 81 of file action_node.h.


Member Typedef Documentation

Definition at line 84 of file action_node.h.


Constructor & Destructor Documentation

BT::SimpleActionNode::SimpleActionNode ( const std::string &  name,
SimpleActionNode::TickFunctor  tick_functor,
const NodeConfiguration config 
)

Definition at line 27 of file action_node.cpp.


Member Function Documentation

NodeStatus BT::SimpleActionNode::tick ( ) [override, protected, virtual]

Method to be implemented by the user.

Implements BT::TreeNode.

Definition at line 34 of file action_node.cpp.


Member Data Documentation

Definition at line 95 of file action_node.h.


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


behaviortree_cpp
Author(s): Michele Colledanchise, Davide Faconti
autogenerated on Sat Jun 8 2019 20:17:15