1 /*=========================================================================
4 Module: $RCSfile: gdcmDebug.cxx,v $
6 Date: $Date: 2004/06/20 18:08:47 $
7 Version: $Revision: 1.2 $
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 =========================================================================*/
20 #include "gdcmDebug.h"
24 * \brief Instance of debugging utility.
30 * @param level debug level
32 gdcmDebug::gdcmDebug(int level) {
38 * @param level Set the debug level
40 void gdcmDebug::SetDebug(int level) {
47 * @param Msg1 first message part
48 * @param Msg2 second message part
50 void gdcmDebug::Verbose(int Level, const char * Msg1, const char * Msg2) {
51 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) {
65 std::cerr << Msg1 << ' ' << Msg2 << std::endl;
71 * @param Msg1 first message part
72 * @param Msg2 second message part
73 * @param Msg3 Third message part
75 void gdcmDebug::Error(const char* Msg1, const char* Msg2,
77 std::cerr << Msg1 << ' ' << Msg2 << ' ' << Msg3 << std::endl;
85 * @param Msg1 first message part
86 * @param Msg2 second message part
88 void gdcmDebug::Assert(int Level, bool Test,
89 const char * Msg1, const char * Msg2) {
90 if (Level > DebugLevel)
93 std::cerr << Msg1 << ' ' << Msg2 << std::endl;
98 * @param a return code
100 void gdcmDebug::Exit(int a) {
105 exit(a); // Found in #include <stdlib.h>