2000-03-28 02:18:55 +00:00
|
|
|
// -*- C++ -*-
|
2000-03-17 10:26:26 +00:00
|
|
|
#ifndef TRACER_H
|
|
|
|
#define TRACER_H
|
|
|
|
|
|
|
|
#include "debug.h"
|
|
|
|
#include "LString.h"
|
|
|
|
|
|
|
|
class DebugTracer {
|
|
|
|
public:
|
2000-04-08 17:02:02 +00:00
|
|
|
explicit
|
2000-03-17 10:26:26 +00:00
|
|
|
DebugTracer(string const & s) : str(s) {
|
2000-03-28 02:18:55 +00:00
|
|
|
lyxerr << string(depth, ' ') << "Trace begin : "
|
2000-04-04 00:19:15 +00:00
|
|
|
<< str << std::endl;
|
2000-03-17 10:26:26 +00:00
|
|
|
++depth;
|
|
|
|
|
|
|
|
}
|
|
|
|
~DebugTracer() {
|
|
|
|
--depth;
|
2000-03-28 02:18:55 +00:00
|
|
|
lyxerr << string(depth, ' ') << "Trace end : "
|
2000-04-04 00:19:15 +00:00
|
|
|
<< str << std::endl;
|
2000-03-17 10:26:26 +00:00
|
|
|
}
|
|
|
|
private:
|
|
|
|
string str;
|
|
|
|
static int depth;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|