diff options
Diffstat (limited to 'trace.h')
-rw-r--r-- | trace.h | 39 |
1 files changed, 39 insertions, 0 deletions
@@ -0,0 +1,39 @@ +#ifndef INCLUDE_BLASSIC_TRACE_H +#define INCLUDE_BLASSIC_TRACE_H + +// trace.h +// Revision 7-feb-2005 + +#include <cstddef> +#include <string> + + +class TraceFunc { +public: + TraceFunc (const char * strFuncName); + ~TraceFunc (); + void message (const std::string & str); + static void show (int); +private: + const char * strfunc; + TraceFunc * * previous; + TraceFunc * next; +}; + +#ifndef NDEBUG + +#define TRACEFUNC(tr,name) \ + TraceFunc tr (name) +#define TRMESSAGE(tr,text) \ + tr.message (text) + +#else + +#define TRACEFUNC(tr,name) +#define TRMESSAGE(tr,text) + +#endif + +#endif + +// Fin de trace.h |