- static void SetDebugOn () { SetDebugFlag(true); };
- static void SetDebugOff () { SetDebugFlag(false); };
-
- /// This is a global flag that controls if debug are redirected
- /// to a file or not
- static bool GetDebugToFile ();
- static void SetDebugToFile (bool flag);
- static void SetDebugToFileOn () { SetDebugToFile(true); };
- static void SetDebugToFileOff () { SetDebugToFile(false); };
-
- /// Set the filename the debug stream should be redirect to
- /// Settting a filename also set DebugToFile to true
- static void SetDebugFilename (std::string const& filename);
-
- /// Internal use only. Allow us to retrieve the static from anywhere
- /// in gdcm code
- static std::ofstream & GetDebugFile ();
+ /// \brief Gets the debug flag value
+ static bool GetDebugFlag () {return DebugFlag; }
+ /// \brief Sets the Debug Flag to true
+ static void DebugOn () { SetDebugFlag(true); }
+ /// \brief Sets the Debug Flag to false
+ static void DebugOff () { SetDebugFlag(false); }
+
+ /// \brief This is a global flag that controls whether
+ /// log messages are displayed.
+ static void SetLogFlag (bool flag);
+ /// \brief Gets the Log flag value
+ static bool GetLogFlag () {return LogFlag; }
+ /// \brief Sets the Log Flag to true
+ static void LogOn () { SetLogFlag(true); }
+ /// \brief Sets the Log Flag to false
+ static void LogOff () { SetLogFlag(false); }
+
+ /// \brief This is a global flag that controls whether
+ /// warning messages are displayed.
+ static void SetWarningFlag (bool flag);
+ /// \brief Gets the warning flag value
+ static bool GetWarningFlag () {return WarningFlag; }
+ /// \brief Sets the Warning Flag to true
+ static void WarningOn () { SetWarningFlag(true); }
+ /// \brief Sets the Warning Flag to false
+ static void WarningOff () { SetWarningFlag(false); }
+
+ /// \brief This is a global flag that controls if debug are redirected
+ /// to a file or not
+ static void SetOutputToFile (bool flag);
+ static bool GetOutputToFile ();
+ /// \brief Next debug messages will be sent in the debug file
+ static void OutputToFileOn () { SetOutputToFile(true); }
+ /// \brief Next debug messages will be sent in the standard output
+ static void OutputToFileOff () { SetOutputToFile(false); }
+
+ static void SetOutputFileName (std::string const &filename);
+
+ static std::ostream &GetOutput ();
+
+ static void SendToOutput(unsigned int type,std::string const &msg,
+ const Base *object = NULL);
+
+private:
+ static bool WarningFlag;
+ static bool LogFlag;
+ static bool DebugFlag;
+
+ static bool OutputToFile;
+
+ static std::ofstream OutputFileStream;
+ static std::ostream &StandardStream;
+
+ static const int LINE_LENGTH;