00001
00027
00028
00029
00030
00031
00032
00033 #ifndef __MyTracer__
00034 # define __MyTracer__
00035
00036 #if DEBUG_TRACE_ALL
00037 # define TRACER(Fun) MyTracer tmp (Fun)
00038
00039
00040 #include <iostream>
00041
00042
00043 using namespace std;
00044
00045
00046 class MyTracer {
00047 public:
00048 MyTracer (const char* fun);
00049 ~MyTracer ();
00050 static void printStack (ostream&);
00051
00052 private:
00053 const char* _fun;
00054 MyTracer* _previous;
00055 static MyTracer* _current;
00056
00057 void printStack (ostream&, int& depth);
00058 };
00059
00060
00061 #else
00062 # define TRACER(Fun)
00063 #endif
00064
00065 #endif // MyTracer