X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmDebug.cxx;h=541f79fc35d01e49639e3b669179afe64f9a9f1b;hb=0ce6682a82eacb85233fcccef601f83bb591ec12;hp=41f6f18cbb5a5301ecdc126b7ba39eefe9ce2f6b;hpb=c67ffef593e7635d8dfa7d3fe63d702e5afafc3e;p=gdcm.git diff --git a/src/gdcmDebug.cxx b/src/gdcmDebug.cxx index 41f6f18c..541f79fc 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/01/27 11:55:57 $ - Version: $Revision: 1.18 $ + Date: $Date: 2005/02/04 16:51:36 $ + Version: $Revision: 1.24 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -21,13 +21,14 @@ namespace gdcm { - -/// warning message level to be displayed +//----------------------------------------------------------------------------- +// Warning message level to be displayed static bool DebugFlag = false; static bool DebugToFile = false; static std::ofstream DebugFile; - +//----------------------------------------------------------------------------- +// Constructor / Destructor Debug::Debug() { @@ -38,9 +39,11 @@ Debug::~Debug() if ( DebugFile.is_open() ) DebugFile.close(); } + //----------------------------------------------------------------------------- +// Public /** - * \brief Accessor + * \brief Sets the debug flag * @param flag Set the debug flag */ void Debug::SetDebugFlag (bool flag) @@ -49,8 +52,8 @@ void Debug::SetDebugFlag (bool flag) } /** - * \brief Accessor - * @param level Get the debug flag + * \brief Gets the debug flag value + * @return debug flag value */ bool Debug::GetDebugFlag () { @@ -59,7 +62,7 @@ bool Debug::GetDebugFlag () /** * \brief Accessor - * @param flag Set the debug flag to redirect to file + * @param flag whether we want to redirect to file */ void Debug::SetDebugToFile (bool flag) { @@ -67,8 +70,7 @@ void Debug::SetDebugToFile (bool flag) } /** - * \brief Accessor - * @param level Get the debug flag to redirect to file + * \brief Accessor to know if debug info are redirected to file */ bool Debug::GetDebugToFile () { @@ -76,8 +78,9 @@ bool Debug::GetDebugToFile () } /** - * \brief Accessor - * @param flag Set the debug flag to redirect to file + * \brief Set the filename the debug stream should be redirect to + * Settting a filename also set DebugToFile to true + * @param filename File to redirect debug info * Absolutely nothing is check. You have to pass in * a correct filename */ @@ -90,11 +93,24 @@ void Debug::SetDebugFilename (std::string const &filename) DebugFile.open( filename.c_str() ); } +/** + * \brief Internal use only. Allow us to retrieve the static from anywhere + * in gdcm code + * @return Debug file + */ std::ofstream &Debug::GetDebugFile () { return DebugFile; } -} // end namespace gdcm +//----------------------------------------------------------------------------- +// Protected +//----------------------------------------------------------------------------- +// Private + +//----------------------------------------------------------------------------- +// Print +//----------------------------------------------------------------------------- +} // end namespace gdcm