Diffpack Documentation


Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

dpTracer Struct Reference

class for convenient manual trace of C++ code. More...

#include <dpTracer.h>

List of all members.

Public Methods

 dpTracer (const char *)
 ~dpTracer ()


Detailed Description

class for convenient manual trace of C++ code.

NAME: dpTracer - class for convenient manual trace of C++ code

DESCRIPTION:

The class is used to trace C++ code. Instead of enclosing debug output statements at the beginning and end of functions in "ifdef" preprocessor statements, "dpTracer" can give the same effect. The result is shorter and prettier code. The basic idea is that one declares a "dpTracer" object at the beginning of the function. If "DP_DEBUG" is on (or greater than zero) the constructor of "dpTracer" will print a message. The message is given as an argument to the constructor. When the "dpTracer" goes out of scope at the end of the function, the "dpTracer" destructor will write a message that the end of the function is reached. When "DP_DEBUG" is undefined, the "dpTracer" object is empty and the constructor and destructor are empty inline functions. Hence, there should be negligble overhead in using "dpTracer". You must put a "dpTracer" object in the beginning of all functions you want to include in your trace mechanism. In practice, you apply the "DPTRACE" macro as shown below.


Constructor & Destructor Documentation

dpTracer::dpTracer ( const char * message ) [inline]
 

See documentation of one of the overloaded constructor.

dpTracer::~dpTracer ( ) [inline]
 


The documentation for this struct was generated from the following file:
Copyright © 2003 inuTech GmbH. All rights reserved.