aboutsummaryrefslogtreecommitdiffstats
path: root/trace.h
blob: 6f671f86f8e818dfc82a88cad365a65916f05749 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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
Un proyecto texto-plano.xyz