]> git.lyx.org Git - lyx.git/blobdiff - src/support/DebugStream.h
use more explicit on constructors use the pimpl idom to reduce size with about 500k
[lyx.git] / src / support / DebugStream.h
index f20067da2b75d3b721a4a1b1ddf1a109d5c6cd19..9e87488a087a0ecd212e983ca9e97997f093edb4 100644 (file)
@@ -12,9 +12,7 @@
 #ifndef DEBUGSTREAM_H
 #define DEBUGSTREAM_H
 
-#include <iostream>
-
-using std::ostream;
+#include "LOstream.h"
 
 #ifdef TEST_DEBUGSTREAM
 #include <string>
@@ -84,12 +82,13 @@ struct Debug {
     debug[Debug::type(Debug::INFO | Debug::CRIT)] << "...info/crit...\n";
 
 */
-class DebugStream : public ostream {
+class DebugStream : public std::ostream {
 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);
 
        ///
@@ -130,7 +129,7 @@ public:
            current debug level otherwise the real debug stream
            is used.
        */
-       ostream & debug(Debug::type t = Debug::ANY) {
+       std::ostream & debug(Debug::type t = Debug::ANY) {
                if (dt & t) return *this;
                return nullstream;
        }
@@ -139,14 +138,14 @@ public:
        /** This is an operator to give a more convenient use:
            dbgstream[Debug::INFO] << "Info!\n";
        */
-       ostream & operator[](Debug::type t) {
+       std::ostream & operator[](Debug::type t) {
                return debug(t);
        }
 private:
        /// The current debug level
        Debug::type dt;
        /// The no-op stream.
-       ostream nullstream;
+       std::ostream nullstream;
        struct debugstream_internal;
        debugstream_internal * internal;
 };