1 /*=========================================================================
4 Module: $RCSfile: gdcmDebug.h,v $
6 Date: $Date: 2004/08/01 02:39:09 $
7 Version: $Revision: 1.5 $
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.
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.
17 =========================================================================*/
22 #include "gdcmCommon.h"
24 //-----------------------------------------------------------------------------
25 #define dbg gdcmDebug::GetReference()
27 //-----------------------------------------------------------------------------
31 * \brief gdcmDebug is an object for debugging in program.
32 * It has 2 debugging modes :
33 * - error : for bad library use
34 * - debug : for debugging messages
36 * A debugging message has a level of priority and is
37 * Shown only when the debug level is higher than the
40 class GDCM_EXPORT gdcmDebug
43 gdcmDebug(int level = -1);
45 void SetDebug (int level);
46 void Verbose(int level, const char* msg1, const char* msg2 = "") ;
47 void Error (bool test, const char* msg1, const char* msg2 = "");
48 void Error (const char* msg1, const char* msg2 = "", const char* msg3 = "");
50 void Assert(int level, bool test, const char * msg1, const char * msg2);
53 static gdcmDebug &GetReference();
56 /// warning message level to be displayed
59 /// Instance of debugging utility.
60 static gdcmDebug debug;