]> git.lyx.org Git - lyx.git/blob - src/tracer.h
47c13f09449a2544c2ab01ceac259794cbb02b9c
[lyx.git] / src / tracer.h
1 #ifndef TRACER_H
2 #define TRACER_H
3
4 #include "debug.h"
5 #include "LString.h"
6
7 class DebugTracer {
8 public:
9         DebugTracer(string const & s) : str(s) {
10                 lyxerr << string(depth, ' ') << "Trace begin : " << str << endl;
11                 ++depth;
12                 
13         }
14         ~DebugTracer() {
15                 --depth;
16                 lyxerr << string(depth, ' ') << "Trace end : " << str << endl;
17         }
18 private:
19         string str;
20         static int depth;
21 };
22
23 #endif