1 /*=========================================================================
4 Module: $RCSfile: gdcmDebug.cxx,v $
6 Date: $Date: 2004/09/27 08:39:05 $
7 Version: $Revision: 1.7 $
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.
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 =========================================================================*/
20 #include "gdcmDebug.h"
22 //-----------------------------------------------------------------------------
25 * @param level debug level
27 gdcmDebug::gdcmDebug(int level)
34 * @param level Set the debug level
36 void gdcmDebug::SetDebug(int level)
44 * @param msg1 first message part
45 * @param msg2 second message part
47 void gdcmDebug::Verbose(int level, const char * msg1, const char * msg2)
49 if (level > DebugLevel)
53 std::cerr << msg1 << ' ' << msg2 << std::endl;
59 * @param msg1 first message part
60 * @param msg2 second message part
62 void gdcmDebug::Error(bool test, const char * msg1, const char * msg2)
68 std::cerr << msg1 << ' ' << msg2 << std::endl;
74 * @param msg1 first message part
75 * @param msg2 second message part
76 * @param msg3 Third message part
78 void gdcmDebug::Error(const char* msg1, const char* msg2,
81 std::cerr << msg1 << ' ' << msg2 << ' ' << msg3 << std::endl;
89 * @param msg1 first message part
90 * @param msg2 second message part
92 void gdcmDebug::Assert(int level, bool test, const char * msg1,
95 if (level > DebugLevel)
101 std::cerr << msg1 << ' ' << msg2 << std::endl;
107 * @param a return code
109 void gdcmDebug::Exit(int a)
115 exit(a); // Found in #include <stdlib.h>