]> Creatis software - gdcm.git/blob - src/gdcmDebug.h
* Erroneous leading white fix:
[gdcm.git] / src / gdcmDebug.h
1 /*=========================================================================
2                                                                                 
3   Program:   gdcm
4   Module:    $RCSfile: gdcmDebug.h,v $
5   Language:  C++
6   Date:      $Date: 2004/06/20 18:08:47 $
7   Version:   $Revision: 1.3 $
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.htm 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 /**
23  * \ingroup gdcmDebug
24  * \brief gdcmDebug is an object for debugging in program.
25  * It has 2 debugging modes :
26  *  - error : for bad library use
27  *  - debug : for debugging messages
28  * 
29  * A debugging message has a level of priority and is 
30  * Shown only when the debug level is higher than the 
31  * message level.
32  */
33 class gdcmDebug {
34 public:
35    gdcmDebug(int level = -1);
36
37    void SetDebug (int level);
38    void Verbose(int, const char*, const char* ="");
39    void Error(bool, const char*,  const char* ="");
40    void Error(const char*, const char* ="", const char* ="");
41
42    void Assert(int, bool, const char*, const char*);
43    void Exit(int);
44
45 private:
46 /// warning message level to be displayed
47    int DebugLevel;
48 };
49
50 extern gdcmDebug dbg;
51
52 #endif