- /// This is a global flag that controls whether any debug, warning
- /// messages are displayed.
- static int GetDebugFlag ();
- static void SetDebugFlag (int flag);
- static void SetDebugOn () { SetDebugFlag(1); };
- static void SetDebugOff () { SetDebugFlag(0); };
+ Debug();
+ ~Debug();
+
+ /// \brief This is a global flag that controls whether any debug, warning
+ /// messages are displayed.
+ static void SetDebugFlag (bool flag);
+ static bool GetDebugFlag ();
+ /// \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 if debug are redirected
+ /// to a file or not
+ static void SetDebugToFile (bool flag);
+ static bool GetDebugToFile ();
+ /// \brief Next debug messages will be sent in the debug file
+ static void DebugToFileOn () { SetDebugToFile(true); };
+ /// \brief Next debug messages will be sent in the standard output
+ static void DebugToFileOff () { SetDebugToFile(false); };
+
+ static void SetDebugFilename (std::string const &filename);
+
+ static std::ofstream &GetDebugFile ();