12 bool expected =
false;
13 if (!
ref_count.compare_exchange_strong(expected,
true))
15 throw LogicError(
"Only one instance of StdCoutLogger shall be created");
38 const std::string& category =
toStr(node.
type());
39 const char* name = node.
name().c_str();
51 MTR_END(category.c_str(), name);
virtual NodeType type() const =0
const std::string & name() const
Name of the instance, not the type.
void mtr_register_sigint_handler()
void mtr_init(const char *json_file)
std::string toStr(T value)
virtual ~MinitraceLogger() override
virtual void callback(Duration timestamp, const TreeNode &node, NodeStatus prev_status, NodeStatus status) override
static std::atomic< bool > ref_count
Abstract base class for Behavior Tree Nodes.
virtual void flush() override
Struct used to store a tree. If this object goes out of scope, the tree is destroyed.
MinitraceLogger(const BT::Tree &tree, const char *filename_json)
#define MTR_INSTANT(c, n)
void enableTransitionToIdle(bool enable)
std::chrono::high_resolution_clock::duration Duration