]> git.lyx.org Git - lyx.git/blobdiff - src/support/DebugStream.h
Create a grfx::Loader class and so move large chunks of code out of
[lyx.git] / src / support / DebugStream.h
index fd361cd514918a9f9c05b989515f3dc3dc7953ce..9ed437600edebddb709db37d12a8e2af6f06a75f 100644 (file)
@@ -18,9 +18,6 @@
 
 #include "LOstream.h"
 
-// I don't really like this, but too please doc++...(Lgb)
-using std::ostream;
-
 #ifdef TEST_DEBUGSTREAM
 #include <string>
 struct Debug {
@@ -56,12 +53,12 @@ struct Debug {
     INFO
     Always
 
-    If you want to have debug output from time critical code you should 
+    If you want to have debug output from time critical code you should
     use this construct:
     if (debug.debugging(Debug::INFO)) {
-         debug << "...debug output...\n";
+        debug << "...debug output...\n";
     }
-    
+
     To give debug info even if no debug (NONE) is requested:
     debug << "... always output ...\n";
 
@@ -78,15 +75,12 @@ struct Debug {
     debug[Debug::type(Debug::INFO | Debug::CRIT)] << "...info/crit...\n";
 
 */
-class DebugStream : public ostream
+class DebugStream : public std::ostream
 {
-// This workaround is needed only for gcc 2.8.1 (and possibly egcs
-// 1.0.x), which generates a compiler error when subclassing from
-// std::. (JMarc)
 public:
        /// Constructor, sets the debug level to t.
        explicit DebugStream(Debug::type t = Debug::NONE);
-       
+
        /// Constructor, sets the log file to f, and the debug level to t.
        explicit
        DebugStream(char const * f, Debug::type t = Debug::NONE);
@@ -116,7 +110,7 @@ public:
 
        /// Sets the debugstreams' logfile to f.
        void logFile(char const * f);
-       
+
        /// Returns true if t is part of the current debug level.
        bool debugging(Debug::type t = Debug::ANY) const
        {
@@ -124,7 +118,7 @@ public:
                return false;
        }
 
-       
+
        /** Returns the no-op stream if t is not part of the
            current debug level otherwise the real debug stream
            is used.
@@ -134,7 +128,7 @@ public:
                return nullstream;
        }
 
-       
+
        /** This is an operator to give a more convenient use:
            dbgstream[Debug::INFO] << "Info!\n";
        */
@@ -153,5 +147,3 @@ private:
 };
 
 #endif
-
-