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

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

#include <FunctionTracer.h>

Collaboration diagram for UA_CoMP::Misc::FunctionTracer:
Collaboration graph

Public Member Functions

 FunctionTracer (const std::string &function_name)
 Constructor inserts message in TrackerOutput about entering a function body. More...
 
 FunctionTracer (const FunctionTracer &)=delete
 No copy constructor. More...
 
FunctionTraceroperator= (const FunctionTracer &)=delete
 No assignment. More...
 
 ~FunctionTracer ()
 Destructor inserts message in TracketOutput about leaving funvtion body. More...
 

Private Attributes

std::string const m_function_name
 

Detailed Description

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

You do this by defining an automatic variable of CodeTracker type at the beginning of the body. The constructor triggers an appropriate message.The destructor for the variable gets called when leaving the function body and triggers the appropriate message. The messages are logged through the TrackerOutput.

Definition at line 34 of file FunctionTracer.h.

Constructor & Destructor Documentation

UA_CoMP::Misc::FunctionTracer::FunctionTracer ( const std::string &  function_name)
explicit

Constructor inserts message in TrackerOutput about entering a function body.

Definition at line 14 of file FunctionTracer.cpp.

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

Here is the call graph for this function:

UA_CoMP::Misc::FunctionTracer::FunctionTracer ( const FunctionTracer )
delete

No copy constructor.

UA_CoMP::Misc::FunctionTracer::~FunctionTracer ( )

Destructor inserts message in TracketOutput about leaving funvtion body.

Definition at line 20 of file FunctionTracer.cpp.

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

Here is the call graph for this function:

Member Function Documentation

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

No assignment.

Member Data Documentation

std::string const UA_CoMP::Misc::FunctionTracer::m_function_name
private

Definition at line 50 of file FunctionTracer.h.

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


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