Sierra Toolkit Version of the Day
SlibDiagWriter.hpp
00001 #ifndef STK_UTIL_DIAG_SlibDiagWriter_h
00002 #define STK_UTIL_DIAG_SlibDiagWriter_h
00003 
00004 #include <stk_util/diag/Trace.hpp>
00005 #include <stk_util/diag/Writer.hpp>
00006 #include <stk_util/diag/WriterParser.hpp>
00007 
00008 #include <stk_util/diag/Writer_fwd.hpp>
00009 
00010 namespace sierra {
00011 namespace Slib {
00012 
00013 stk::diag::Writer &theDiagWriter();
00014 
00016 #define slibout sierra::Slib::theDiagWriter()
00017 
00019 #define SLIB_TRACE_ENABLED
00020 
00021 #ifdef SLIB_TRACE_ENABLED
00022 typedef Diag::Tracespec Tracespec;
00023 typedef Diag::Traceback Traceback;
00024 
00025 class Trace : public Diag::Trace
00026 {
00027 public:
00028   explicit Trace(const char *message)
00029     : Diag::Trace(slibout, message)
00030   {}
00031 };
00032 #else
00033 typedef Diag::Tracespec Tracespec;
00034 typedef Diag::Tracespec Traceback;
00035 typedef Diag::Tracespec Trace;
00036 #endif
00037 
00038 } // namespace Slib
00039 
00040 namespace Diag {
00041 using stk::diag::push;
00042 using stk::diag::pop;
00043 using stk::diag::dendl;
00044 } // namespace Diag
00045 
00046 } // namespace sierra
00047 
00048 #endif // STK_UTIL_DIAG_SlibDiagWriter_h
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines