]> Creatis software - gdcm.git/blob - src/gdcmDebug.h
COMP: Fix VS6 compilation pb
[gdcm.git] / src / gdcmDebug.h
1 /*=========================================================================
2                                                                                 
3   Program:   gdcm
4   Module:    $RCSfile: gdcmDebug.h,v $
5   Language:  C++
6   Date:      $Date: 2005/01/07 16:39:59 $
7   Version:   $Revision: 1.12 $
8                                                                                 
9   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
10   l'Image). All rights reserved. See Doc/License.txt or
11   http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details.
12                                                                                 
13      This software is distributed WITHOUT ANY WARRANTY; without even
14      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15      PURPOSE.  See the above copyright notices for more information.
16                                                                                 
17 =========================================================================*/
18
19 #ifndef GDCMDEBUG_H
20 #define GDCMDEBUG_H
21
22 #include "gdcmCommon.h"
23
24 namespace gdcm 
25 {
26 //-----------------------------------------------------------------------------
27
28 /**
29  * \ingroup Debug
30  * \brief Debug is an object for debugging in program.
31  * It has 2 debugging modes :
32  *  - error : for bad library use
33  *  - debug : for debugging messages
34  * 
35  * A debugging message has a level of priority and is 
36  * Shown only when the debug level is higher than the 
37  * message level.
38  */
39 class GDCM_EXPORT Debug
40 {
41 public:
42    /// This is a global flag that controls whether any debug, warning
43    /// messages are displayed.
44    static void SetDebugLevel (int level);
45    static int  GetDebugLevel ();
46
47    static void Verbose(int level, const char *msg1, const char *msg2 = "") ;
48    static void Error  (bool test, const char *msg1, const char *msg2 = "");
49    static void Error  (const char *msg1, const char *msg2 = "", const char *msg3 = "");
50
51    static void Assert(int level, bool test, const char *msg1, const char *msg2);
52    static void Exit  (int a);
53 };
54
55 } // end namespace gdcm
56
57 #endif