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