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 (const BT::Tree &tree)
 
 ~StdCoutLogger () override
 
- Public Member Functions inherited from BT::StatusChangeLogger
bool enabled () const
 
void enableTransitionToIdle (bool enable)
 
void setEnabled (bool enabled)
 
void setTimestampType (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 ( const BT::Tree tree)

Definition at line 7 of file bt_cout_logger.cpp.

BT::StdCoutLogger::~StdCoutLogger ( )
override

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 37 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:


behaviotree_cpp_v3
Author(s): Michele Colledanchise, Davide Faconti
autogenerated on Tue May 4 2021 02:56:26