aboutsummaryrefslogtreecommitdiffstats
path: root/trace.h
diff options
context:
space:
mode:
Diffstat (limited to 'trace.h')
-rw-r--r--trace.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/trace.h b/trace.h
new file mode 100644
index 0000000..6f671f8
--- /dev/null
+++ b/trace.h
@@ -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
Un proyecto texto-plano.xyz