Sierra Toolkit  Version of the Day
SlibDiagWriter.hpp
1 #ifndef STK_UTIL_DIAG_SlibDiagWriter_h
2 #define STK_UTIL_DIAG_SlibDiagWriter_h
3 
4 #include <stk_util/diag/Trace.hpp>
5 #include <stk_util/diag/Writer.hpp>
6 #include <stk_util/diag/WriterParser.hpp>
7 
8 #include <stk_util/diag/Writer_fwd.hpp>
9 
10 namespace sierra {
11 namespace Slib {
12 
13 stk_classic::diag::Writer &theDiagWriter();
14 
16 #define slibout sierra::Slib::theDiagWriter()
17 
19 #define SLIB_TRACE_ENABLED
20 
21 #ifdef SLIB_TRACE_ENABLED
22 typedef Diag::Tracespec Tracespec;
23 typedef Diag::Traceback Traceback;
24 
25 class Trace : public Diag::Trace
26 {
27 public:
28  explicit Trace(const char *message)
29  : Diag::Trace(slibout, message)
30  {}
31 };
32 #else
33 typedef Diag::Tracespec Tracespec;
34 typedef Diag::Tracespec Traceback;
35 typedef Diag::Tracespec Trace;
36 #endif
37 
38 } // namespace Slib
39 
40 namespace Diag {
44 } // namespace Diag
45 
46 } // namespace sierra
47 
48 #endif // STK_UTIL_DIAG_SlibDiagWriter_h
Definition: Env.cpp:53
Writer & pop(Writer &dout)
Member function pop calls the Writer::pop manipulator.
Definition: Writer.hpp:556
Trace(Writer &dout, const char *function_name, int print_mask=LOG_TRACE, bool do_trace=true)
Creates a new Trace instance, resulting in the printing of the member function name and pushing the d...
Writer & dendl(Writer &dout)
Writer function dendl calls the Writer::dendl manipulator.
Definition: Writer.hpp:520
Class Writer implements a runtime selectable diagnostic output writer to aid in the development and d...
Definition: Writer.hpp:49
Writer & push(Writer &dout)
Function push calls the Writer::push manipulator.
Definition: Writer.hpp:544