+ Debug();
+ ~Debug();
+
+ /// \brief This is a global flag that controls whether
+ /// both debug and warning messages are displayed.
+ /// (used to warn user when file contains some oddity)
+ static void SetDebugFlag (bool flag);
+ /// \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;