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

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

#include <decorator_node.h>

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

List of all members.

Public Types

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

Public Member Functions

 SimpleDecoratorNode (const std::string &name, TickFunctor tick_functor, const NodeParameters &params=NodeParameters())
 ~SimpleDecoratorNode () override

Protected Member Functions

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

Protected Attributes

TickFunctor tick_functor_

Detailed Description

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

BT::NodeStatus functionName(BT::NodeStatus child_status)

This avoids the hassle of inheriting from a DecoratorNode.

Using lambdas or std::bind it is easy to pass a pointer to a method. SimpleDecoratorNode does not support halting, NodeParameters, nor Blackboards.

Definition at line 49 of file decorator_node.h.


Member Typedef Documentation

Definition at line 52 of file decorator_node.h.


Constructor & Destructor Documentation

BT::SimpleDecoratorNode::SimpleDecoratorNode ( const std::string &  name,
TickFunctor  tick_functor,
const NodeParameters params = NodeParameters() 
)

Definition at line 60 of file decorator_node.cpp.


Member Function Documentation

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

Method to be implemented by the user.

Implements BT::TreeNode.

Definition at line 66 of file decorator_node.cpp.


Member Data Documentation

Definition at line 63 of file decorator_node.h.


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


behaviortree_cpp
Author(s): Michele Colledanchise, Davide Faconti
autogenerated on Sat Feb 2 2019 03:50:10