Public Member Functions | Static Private Attributes | List of all members
BT::StdCoutLogger Class Reference

AddStdCoutLoggerToTree. Give the root node of a tree, a simple callback is subscribed to any status change of each node. More...

#include <bt_cout_logger.h>

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

Public Member Functions

virtual void callback (Duration timestamp, const TreeNode &node, NodeStatus prev_status, NodeStatus status) override
 
virtual void flush () override
 
 StdCoutLogger (TreeNode *root_node)
 
 ~StdCoutLogger ()
 
- Public Member Functions inherited from BT::StatusChangeLogger
bool enabled () const
 
void enableTransitionToIdle (bool enable)
 
void setEnabled (bool enabled)
 
void seTimestampType (TimestampType type)
 
bool showsTransitionToIdle () const
 
 StatusChangeLogger (TreeNode *root_node)
 
virtual ~StatusChangeLogger ()=default
 

Static Private Attributes

static std::atomic< bool > ref_count
 

Detailed Description

AddStdCoutLoggerToTree. Give the root node of a tree, a simple callback is subscribed to any status change of each node.

Parameters
root_node
Returns
Important: the returned shared_ptr must not go out of scope, otherwise the logger is removed.

Definition at line 19 of file bt_cout_logger.h.

Constructor & Destructor Documentation

BT::StdCoutLogger::StdCoutLogger ( TreeNode root_node)

Definition at line 7 of file bt_cout_logger.cpp.

BT::StdCoutLogger::~StdCoutLogger ( )

Definition at line 15 of file bt_cout_logger.cpp.

Member Function Documentation

void BT::StdCoutLogger::callback ( Duration  timestamp,
const TreeNode node,
NodeStatus  prev_status,
NodeStatus  status 
)
overridevirtual

Implements BT::StatusChangeLogger.

Definition at line 20 of file bt_cout_logger.cpp.

void BT::StdCoutLogger::flush ( )
overridevirtual

Implements BT::StatusChangeLogger.

Definition at line 35 of file bt_cout_logger.cpp.

Member Data Documentation

std::atomic< bool > BT::StdCoutLogger::ref_count
staticprivate

Definition at line 21 of file bt_cout_logger.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 04:01:55