#include <OMKTracer.h>
Collaboration diagram for OMK::TracerIdTmp:
Public Member Functions | |
TracerIdTmp (const char *id) | |
~TracerIdTmp () | |
Private Attributes | |
bool | _unregisterId |
std::string | _id |
To activate the trace for an id temporarily, create an object of this type. When it will be destroyed the id will return like it was before the object was created.
OMTRACEID( "myId", "will be displayed if the flag \"myId\" is registered" ) ; { OMK::TracerIdTmp tmp( "myId" ) ; OMTRACEID( "myId", "will be always displayed" ) ; } // Implicit call to the destructor of 'tmp' OMTRACEID( "myId", "will be displayed if the flag \"myId\" is registered" ) ;
Definition at line 141 of file OMKTracer.h.
TracerIdTmp::TracerIdTmp | ( | const char * | id | ) |
Definition at line 33 of file OMKTracer.cpp.
References _id, and _unregisterId.
00034 : 00035 _unregisterId( Singleton< Tracer >::getInstance().registerId( id ) ) 00036 { 00037 if ( _unregisterId ) 00038 { 00039 _id = id ; 00040 } 00041 }
TracerIdTmp::~TracerIdTmp | ( | ) |
Definition at line 43 of file OMKTracer.cpp.
References _id, and _unregisterId.
00044 { 00045 if ( _unregisterId ) 00046 { 00047 Singleton< Tracer >::getInstance().unregisterId( _id.c_str() ) ; 00048 } 00049 }
bool OMK::TracerIdTmp::_unregisterId [private] |
std::string OMK::TracerIdTmp::_id [private] |
Documentation generated on Mon Jun 9 11:46:03 2008 |
Generated with doxygen by Dimitri van Heesch , 1997-2007 |