1 /*=========================================================================
4 Module: $RCSfile: gdcmDebug.cxx,v $
6 Date: $Date: 2004/10/15 10:43:27 $
7 Version: $Revision: 1.10 $
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 << std::flush;
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 << std::flush;
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
85 << std::endl << std::flush;
93 * @param msg1 first message part
94 * @param msg2 second message part
96 void Debug::Assert(int level, bool test, const char * msg1,
99 if (level > DebugLevel)
105 std::cerr << "gdcm::" << msg1 << ' ' << msg2
106 << std::endl << std::flush;
112 * @param a return code
114 void Debug::Exit(int a)
120 exit(a); // Found in #include <stdlib.h>
124 } // end namespace gdcm