Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

debug.h

00001 // -*- c++ -*-
00002 
00003 #ifndef QXSERVLET_DEBUG_H
00004 #define QXSERVLET_DEBUG_H
00005 
00006 #include <stdio.h>
00007 #include <qtextstream.h>
00008 
00014 class Debug
00015 {
00016 public:
00017     Debug() : err(stderr) {}    
00018     ~Debug() {}
00019 
00020     static Debug *self() { return me ? me : me = new Debug(); }
00021 
00022     static QTextStream &debug() { return self()->err; }
00023     static QTextStream &warning() { return self()->err; }
00024     static QTextStream &error() { return self()->err; }
00025 
00026 private:
00027     QTextOStream err;
00028     static Debug *me;
00029 };
00030 
00031 inline QTextStream &debug() { return Debug::debug(); }
00032 inline QTextStream &warning() { return Debug::warning(); }
00033 inline QTextStream &error() { return Debug::error(); }
00034 
00035 #endif // QXSERVLET_DEBUG_H
00036 
00037 

Generated on Wed Apr 9 23:50:21 2003 for QXServlet by doxygen1.2.17