Gobelijn API documentation  - generated for commit a0cbea7
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros Pages
UA_CoMP::Misc::BlockTracer Class Reference

Class whose constructor/destructor pair are used to mark entering and leaving a code block. More...

#include <BlockTracer.h>

Collaboration diagram for UA_CoMP::Misc::BlockTracer:
Collaboration graph

Public Member Functions

 BlockTracer (const std::string &msg)
 Constructor insert message in TrackerOutput about entering a block. More...
 
 BlockTracer (const BlockTracer &)=delete
 No copy constructor. More...
 
BlockTraceroperator= (const BlockTracer &)=delete
 No assignment. More...
 
 ~BlockTracer ()
 Destructor inserts message in TracerOutput about leaving a block. More...
 

Private Attributes

const std::string m_msg
 

Detailed Description

Class whose constructor/destructor pair are used to mark entering and leaving a code block.

You do this by defining an automatic variable of BlockTracer type at the beginning of the block. The constructor triggers an appropriate message.The destructor for the variable gets called when leaving the block and triggers the appropriate message. The messages are logged through the tarcer log.

Definition at line 26 of file BlockTracer.h.

Constructor & Destructor Documentation

UA_CoMP::Misc::BlockTracer::BlockTracer ( const std::string &  msg)
explicit

Constructor insert message in TrackerOutput about entering a block.

Definition at line 14 of file BlockTracer.cpp.

References UA_CoMP::Misc::g_tracer_log, UA_CoMP::Misc::TracerOutput::increase_indent(), UA_CoMP::Misc::TracerOutput::log(), and m_msg.

Here is the call graph for this function:

UA_CoMP::Misc::BlockTracer::BlockTracer ( const BlockTracer )
delete

No copy constructor.

UA_CoMP::Misc::BlockTracer::~BlockTracer ( )

Destructor inserts message in TracerOutput about leaving a block.

Definition at line 20 of file BlockTracer.cpp.

References UA_CoMP::Misc::TracerOutput::decrease_indent(), UA_CoMP::Misc::g_tracer_log, UA_CoMP::Misc::TracerOutput::log(), and m_msg.

Here is the call graph for this function:

Member Function Documentation

BlockTracer& UA_CoMP::Misc::BlockTracer::operator= ( const BlockTracer )
delete

No assignment.

Member Data Documentation

const std::string UA_CoMP::Misc::BlockTracer::m_msg
private

Definition at line 42 of file BlockTracer.h.

Referenced by BlockTracer(), and ~BlockTracer().


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