From: Christian P. <cp...@us...> - 2005-05-29 17:42:40
|
Update of /cvsroot/pclasses/pclasses2/include/pclasses In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25752/include/pclasses Modified Files: Trace.h Log Message: - Fixed the global trace macros Index: Trace.h =================================================================== RCS file: /cvsroot/pclasses/pclasses2/include/pclasses/Trace.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- Trace.h 20 May 2005 14:19:52 -0000 1.5 +++ Trace.h 29 May 2005 17:42:31 -0000 1.6 @@ -33,6 +33,7 @@ class TraceLog; +//! Debug tracing stream class PCORE_EXPORT TraceStream: private std::ostream { @@ -73,6 +74,7 @@ static TraceLog _trace; }; +//! A Tracing stream that outputs nothing class NullTraceStream { public: inline NullTraceStream& operator()(const SourceInfo& si) @@ -86,10 +88,10 @@ #if defined(_DEBUG) && !defined(NO_DEBUG) # define P_TRACE(c) P::TraceLog::instance().stream(P_SOURCEINFO,#c,this)() -# define P_TRACE_GLOBAL(c) P::TraceLog::instance().stream(P_SOURCEINFO)() +# define P_TRACE_GLOBAL() P::TraceLog::instance().stream(P_SOURCEINFO)() #else # define P_TRACE(c) NullTraceStream() -# define P_TRACE_GLOBAL(c) NullTraceStream() +# define P_TRACE_GLOBAL() NullTraceStream() #endif } // !namespace P |