]> Creatis software - gdcm.git/blob - src/gdcmDebug.h
Replace the DEBUG on the stack with a global entry in cmake interface:
[gdcm.git] / src / gdcmDebug.h
1 // gdcmDebug.h
2 //-----------------------------------------------------------------------------
3 #ifndef GDCMDEBUG_H
4 #define GDCMDEBUG_H
5
6 /**
7  * \ingroup gdcmDebug
8  * \brief gdcmDebug is an object for debugging in program.
9  * It has 2 debugging modes :
10  *  - error : for bad library use
11  *  - debug : for debugging messages
12  * 
13  * A debugging message has a level of priority and is 
14  * Shown only when the debug level is higher than the 
15  * message level.
16  */
17 class gdcmDebug {
18 public:
19    gdcmDebug(int level = -1);
20
21    void SetDebug (int level);
22    void Verbose(int, const char*, const char* ="");
23    void Error(bool, const char*,  const char* ="");
24    void Error(const char*, const char* ="", const char* ="");
25
26    void Assert(int, bool, const char*, const char*);
27    void Exit(int);
28
29 private:
30 /// warning message level to be displayed
31    int DebugLevel;
32 };
33
34 extern gdcmDebug dbg;
35
36 #endif