1 /*=========================================================================
4 Module: $RCSfile: gdcmDebug.cxx,v $
6 Date: $Date: 2004/10/13 14:15:29 $
7 Version: $Revision: 1.9 $
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"
25 //-----------------------------------------------------------------------------
28 * @param level debug level
30 Debug::Debug(int level)
37 * @param level Set the debug level
39 void Debug::SetDebug(int level)
47 * @param msg1 first message part
48 * @param msg2 second message part
50 void Debug::Verbose(int level, const char * msg1, const char * msg2)
52 if (level > DebugLevel)
56 std::cerr << "gdcm::" << msg1 << ' ' << msg2 << std::endl;
62 * @param msg1 first message part
63 * @param msg2 second message part
65 void Debug::Error(bool test, const char * msg1, const char * msg2)
71 std::cerr << "gdcm::" << msg1 << ' ' << msg2 << std::endl;
77 * @param msg1 first message part
78 * @param msg2 second message part
79 * @param msg3 Third message part
81 void Debug::Error(const char* msg1, const char* msg2,
84 std::cerr << "gdcm::" << msg1 << ' ' << msg2 << ' ' << msg3 << std::endl;
92 * @param msg1 first message part
93 * @param msg2 second message part
95 void Debug::Assert(int level, bool test, const char * msg1,
98 if (level > DebugLevel)
104 std::cerr << "gdcm::" << msg1 << ' ' << msg2 << std::endl;
110 * @param a return code
112 void Debug::Exit(int a)
118 exit(a); // Found in #include <stdlib.h>
122 } // end namespace gdcm