]> git.lyx.org Git - lyx.git/blobdiff - src/support/DebugStream.h
more changes read the ChangeLog
[lyx.git] / src / support / DebugStream.h
index 9e87488a087a0ecd212e983ca9e97997f093edb4..efb7c58b220194c25f96a5aeca5660734e00f787 100644 (file)
 #ifndef DEBUGSTREAM_H
 #define DEBUGSTREAM_H
 
+#ifdef __GNUG__
+#pragma interface
+#endif
+
 #include "LOstream.h"
 
 #ifdef TEST_DEBUGSTREAM
 #include <string>
+///
 struct Debug {
        ///
        enum type {
@@ -45,9 +50,9 @@ struct Debug {
 };
 #endif
 
-/** DebugStream is a ostream intended for debug output. It has also support
-    for a logfile. Debug output is output to cerr and if the logfile is set,
-    to the logfile.
+/** DebugStream is a ostream intended for debug output.
+    It has also support for a logfile. Debug output is output to cerr
+    and if the logfile is set, to the logfile.
 
     Example of Usage:
     DebugStream debug;
@@ -82,7 +87,18 @@ struct Debug {
     debug[Debug::type(Debug::INFO | Debug::CRIT)] << "...info/crit...\n";
 
 */
-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)
+#ifdef CXX_WORKING_NAMESPACES
+///
+class DebugStream : public std::ostream
+#else
+///
+class DebugStream : public ostream
+#endif
+{
 public:
        /// Constructor, sets the debug level to t.
        explicit DebugStream(Debug::type t = Debug::NONE);
@@ -146,8 +162,12 @@ private:
        Debug::type dt;
        /// The no-op stream.
        std::ostream nullstream;
+       ///
        struct debugstream_internal;
+       ///
        debugstream_internal * internal;
 };
 
 #endif
+
+