X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmDebug.cxx;h=d9a56182e30bb7fcb0ff5bb45e77f96f129570ae;hb=0f683a63c5ba0c53a1077a6a61e8aa4b36c88d2b;hp=3e9ca4e2797183ffa7284b210725365f4c7c5d74;hpb=3e82e8b67eddf5d4b95b6aa2a2e2615aced4c452;p=gdcm.git diff --git a/src/gdcmDebug.cxx b/src/gdcmDebug.cxx index 3e9ca4e2..d9a56182 100644 --- a/src/gdcmDebug.cxx +++ b/src/gdcmDebug.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDebug.cxx,v $ Language: C++ - Date: $Date: 2005/02/02 10:02:16 $ - Version: $Revision: 1.22 $ + Date: $Date: 2005/06/24 10:55:58 $ + Version: $Revision: 1.25 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -40,14 +40,10 @@ Debug::~Debug() DebugFile.close(); } -//----------------------------------------------------------------------------- -// Print - - //----------------------------------------------------------------------------- // Public /** - * \brief Accessor + * \brief Sets the debug flag * @param flag Set the debug flag */ void Debug::SetDebugFlag (bool flag) @@ -74,7 +70,7 @@ void Debug::SetDebugToFile (bool flag) } /** - * \brief Accessor to know if debug info are redirected to file + * \brief Accessor to know whether debug info are redirected to file */ bool Debug::GetDebugToFile () { @@ -82,7 +78,8 @@ bool Debug::GetDebugToFile () } /** - * \brief Set Accessor + * \brief Set the filename the debug stream should be redirect to + * Settting a filename also sets DebugToFile to true * @param filename File to redirect debug info * Absolutely nothing is check. You have to pass in * a correct filename @@ -90,14 +87,15 @@ bool Debug::GetDebugToFile () void Debug::SetDebugFilename (std::string const &filename) { DebugToFile = true; // Just in case ... - DebugFlag = true; // Just in case ... - if( DebugFile.is_open() ) + DebugFlag = true; // Just in case ... + if ( DebugFile.is_open() ) DebugFile.close(); DebugFile.open( filename.c_str() ); } /** - * \brief Get Accessor + * \brief Internal use only. Allow us to retrieve the static from anywhere + * in gdcm code * @return Debug file */ std::ofstream &Debug::GetDebugFile () @@ -112,6 +110,7 @@ std::ofstream &Debug::GetDebugFile () // Private //----------------------------------------------------------------------------- -} // end namespace gdcm - +// Print +//----------------------------------------------------------------------------- +} // end namespace gdcm