15 #include <stk_util/util/IndentStreambuf.hpp>
16 #include <stk_util/diag/Writer.hpp>
21 WriterThrowSafe::WriterThrowSafe(
24 m_depth(writer.getDepth())
28 WriterThrowSafe::~WriterThrowSafe()
30 m_writer.restoreDepth(m_depth);
35 std::streambuf * writer_streambuf,
39 m_printMask(print_mask),
42 m_writerStream(writer_streambuf)
74 m_lineMaskStack.resetDepth();
88 m_lineMaskStack.pushDepth();
105 m_lineMaskStack.resetDepth().pop();
119 m_lineMaskStack.popLineMask();
138 std::ios_base & (*f)(std::ios_base&))
148 std::ostream & (*f)(std::ostream&))
162 if (dout.shouldPrint())
163 dout.getStream() << ptr;
174 if (dout.shouldPrint()) {
175 std::ostream &os = dout.getStream();
189 const std::string & s)
201 if (dout.shouldPrint())
202 dout.getStream() << x;
213 if (
dout.shouldPrint())
214 dout.getStream() << x;
223 const long double & x)
225 if (
dout.shouldPrint())
226 dout.getStream() << x;
237 if (
dout.shouldPrint())
238 dout.getStream() << x;
247 const unsigned int & x)
249 if (
dout.shouldPrint())
250 dout.getStream() << x;
261 if (
dout.shouldPrint())
262 dout.getStream() << x;
271 const unsigned long & x)
273 if (
dout.shouldPrint())
274 dout.getStream() << x;
284 if (
dout.shouldPrint())
285 dout.getStream() << x;
293 const unsigned long long & x)
295 if (
dout.shouldPrint())
296 dout.getStream() << x;
306 if (
dout.shouldPrint())
307 dout.getStream() << x;
316 const unsigned short & x)
318 if (
dout.shouldPrint())
319 dout.getStream() << x;
336 if (
dout.shouldPrint())
337 dout.getStream() << str;
348 if (
dout.shouldPrint())
349 dout.getStream() <<
'\'' << s <<
'\'';