1 /*=========================================================================
4 Module: $RCSfile: gdcmDebug.cxx,v $
6 Date: $Date: 2005/01/13 22:30:11 $
7 Version: $Revision: 1.17 $
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 =========================================================================*/
19 #include "gdcmDebug.h"
25 /// warning message level to be displayed
26 static bool DebugFlag = false;
27 static bool DebugToFile = false;
28 static std::ofstream DebugFile;
29 //-----------------------------------------------------------------------------
32 * @param flag Set the debug flag
34 void Debug::SetDebugFlag (bool flag)
41 * @param level Get the debug flag
43 bool Debug::GetDebugFlag ()
50 * @param flag Set the debug flag to redirect to file
52 void Debug::SetDebugToFile (bool flag)
59 * @param level Get the debug flag to redirect to file
61 bool Debug::GetDebugToFile ()
68 * @param flag Set the debug flag to redirect to file
69 * Absolutely nothing is check. You have to pass in
72 void Debug::SetDebugFilename (std::string const& filename)
74 DebugToFile = true; // Just in case ...
75 DebugFlag = true; // Just in case ...
76 DebugFile.open( filename.c_str() );
79 std::ofstream & Debug::GetDebugFile ()
84 } // end namespace gdcm