Sierra Toolkit
Version of the Day
|
Class Writer implements a runtime selectable diagnostic output writer to aid in the development and diagnostics of massively parallel applications. More...
#include <Writer.hpp>
Public Types | |
enum | Flags { DISABLED = 0x00, ENABLED = 0x01 } |
Enumeration Flags. More... | |
Public Member Functions | |
Writer (std::streambuf *streambuf, PrintMask print_mask=static_cast< PrintMask >(LOG_MEMBERS), Flags flags=static_cast< Flags >(ENABLED)) | |
Creates a new Writer instance with the specified print mask and output flags. More... | |
~Writer () | |
Destroys a Writer instance. | |
std::ostream & | getStream () |
Member function getStream returns the output stream. More... | |
Writer & | setFlags (int flags) |
Member function setFlags sets the flags bitmask which describes the output line prefix content. More... | |
int | getFlags () |
Member function getFlags returns the flags bitmask. More... | |
int | getDepth () const |
Writer & | restoreDepth (int depth) |
Writer & | setPrintMask (PrintMask mask=0) |
Member function setPrintMask sets the print output mask. More... | |
Writer & | setLineMask (PrintMask line_mask) |
Member function setPrintMask sets the print output mask. More... | |
Writer & | m (PrintMask line_mask) |
Member function m sets the line mask of this line. More... | |
Writer & | w (bool on, PrintMask line_mask) |
Member function m sets the line mask of this line. More... | |
Writer & | t (PrintMask line_mask=0) |
Member function t sets the line mask of this line to line_make bitwise or'ed with LOG_TRACE. More... | |
PrintMask | getPrintMask () |
Member function getLineMask returns the current line mask. More... | |
bool | isEnabled () |
Member function isEnabled returns true if the ENABLED bit is set in the flags bitmask. More... | |
bool | isLoggable (PrintMask line_mask) |
Member function isLoggable returns true if any corresponding bit in the line mask matches a bit in the print mask, except LOG_TRACE which also requires isTracing() to be true. More... | |
bool | shouldPrint () |
Member function shouldPrint returns true if the line should print. More... | |
bool | shouldPrint (PrintMask line_mask) |
Member function shouldPrint returns true if the line should print. More... | |
bool | shouldTrace (int line_mask) |
Member function shouldTrace returns true if any corresponding bit in the line mask matches a bit in the print mask, except LOG_TRACE which also requires isTracing() to be true. More... | |
Writer & | dflush () |
Member function dflush flushes the output stream. More... | |
Writer & | dendl () |
Member function dendl is a manipulator which sets the output stream to a new line. More... | |
Writer & | push () |
Member function push is a manipulator which increases the line mask depth by one. More... | |
Writer & | pop () |
Member function pop is a manipulator which decreases the line mask depth by one, but not less than zero(0). More... | |
Writer & | resetLineMask () |
Member function pop is a manipulator which decreases the line mask depth by one, but not less than zero(0). More... | |
Writer & | operator<< (Writer &(*f)(Writer &)) |
Member function operator<< is the manipulator instantiation function. More... | |
Writer & | operator<< (std::ios_base &(*f)(std::ios_base &)) |
Member function operator<< passes the ios_base manipulator function to the output stream. More... | |
Writer & | operator<< (std::ostream &(*f)(std::ostream &)) |
Member function operator<< passes the iostream manipulator function to the output stream. More... | |
int | incTraceDepth () |
Member function incTraceDepth increments the tracing count. More... | |
int | decTraceDepth () |
Member function decTraceDepth decrements the tracing count. More... | |
bool | isTracing () |
Member function isTracing returns true of the trace depth is greater than zero. The value of -1 is initially stored in the depth as a flag that the trace counters have never been called. (This may be and obsolete requirement). More... | |
bool | isTraceable () |
Member function isTraceable returns true if currently tracing or tracing is enabled. More... | |
Class Writer implements a runtime selectable diagnostic output writer to aid in the development and diagnostics of massively parallel applications.
Definition at line 49 of file Writer.hpp.
Enumeration Flags.
Definition at line 60 of file Writer.hpp.
|
explicit |
Creates a new Writer instance with the specified print mask and output flags.
print_mask | a PrintMask value of the print mask to apply to this writer. |
flags | a Flags value of the selected output flags. |
Definition at line 34 of file Writer.cpp.
|
inline |
Member function getStream returns the output stream.
Definition at line 210 of file Writer.hpp.
|
inline |
Member function setFlags sets the flags bitmask which describes the output line prefix content.
flags | an int of the bitmask of flags. |
Definition at line 222 of file Writer.hpp.
|
inline |
Member function getFlags returns the flags bitmask.
Definition at line 232 of file Writer.hpp.
|
inline |
Member function setPrintMask sets the print output mask.
mask | an PrintMask value of the new print mask. |
Definition at line 255 of file Writer.hpp.
|
inline |
Member function setPrintMask sets the print output mask.
mask_string | an PrintMask value of the new print mask. |
line_mask | an PrintMask of the mask for this line. |
Definition at line 280 of file Writer.hpp.
|
inline |
Member function m sets the line mask of this line.
line_mask | an PrintMask of the mask for this line. |
Definition at line 294 of file Writer.hpp.
|
inline |
Member function m sets the line mask of this line.
line_mask | an PrintMask of the mask for this line. |
Definition at line 308 of file Writer.hpp.
|
inline |
Member function t sets the line mask of this line to line_make bitwise or'ed with LOG_TRACE.
line_mask | an PrintMask of the mask for this line. |
Definition at line 323 of file Writer.hpp.
|
inline |
Member function getLineMask returns the current line mask.
Definition at line 334 of file Writer.hpp.
|
inline |
Member function isEnabled returns true if the ENABLED bit is set in the flags bitmask.
Definition at line 345 of file Writer.hpp.
|
inline |
Member function isLoggable returns true if any corresponding bit in the line mask matches a bit in the print mask, except LOG_TRACE which also requires isTracing() to be true.
Definition at line 356 of file Writer.hpp.
|
inline |
Member function shouldPrint returns true if the line should print.
Definition at line 369 of file Writer.hpp.
|
inline |
Member function shouldPrint returns true if the line should print.
line_mask | a PrintMask value of the line mask. |
Definition at line 380 of file Writer.hpp.
|
inline |
Member function shouldTrace returns true if any corresponding bit in the line mask matches a bit in the print mask, except LOG_TRACE which also requires isTracing() to be true.
Definition at line 392 of file Writer.hpp.
Writer & stk_classic::diag::Writer::dflush | ( | ) |
Member function dflush flushes the output stream.
Definition at line 56 of file Writer.cpp.
Writer & stk_classic::diag::Writer::dendl | ( | ) |
Member function dendl is a manipulator which sets the output stream to a new line.
The std::endl manipulator is sent to the output stream.
Definition at line 70 of file Writer.cpp.
Writer & stk_classic::diag::Writer::push | ( | ) |
Member function push is a manipulator which increases the line mask depth by one.
Definition at line 86 of file Writer.cpp.
Writer & stk_classic::diag::Writer::pop | ( | ) |
Member function pop is a manipulator which decreases the line mask depth by one, but not less than zero(0).
Definition at line 102 of file Writer.cpp.
Writer & stk_classic::diag::Writer::resetLineMask | ( | ) |
Member function pop is a manipulator which decreases the line mask depth by one, but not less than zero(0).
Definition at line 118 of file Writer.cpp.
Member function operator<< is the manipulator instantiation function.
Definition at line 131 of file Writer.cpp.
Writer & stk_classic::diag::Writer::operator<< | ( | std::ios_base &(*)(std::ios_base &) | f | ) |
Member function operator<< passes the ios_base manipulator function to the output stream.
Definition at line 137 of file Writer.cpp.
Writer & stk_classic::diag::Writer::operator<< | ( | std::ostream &(*)(std::ostream &) | f | ) |
Member function operator<< passes the iostream manipulator function to the output stream.
Definition at line 147 of file Writer.cpp.
|
inline |
Member function incTraceDepth increments the tracing count.
Definition at line 468 of file Writer.hpp.
|
inline |
Member function decTraceDepth decrements the tracing count.
Definition at line 477 of file Writer.hpp.
|
inline |
Member function isTracing returns true of the trace depth is greater than zero. The value of -1 is initially stored in the depth as a flag that the trace counters have never been called. (This may be and obsolete requirement).
Definition at line 489 of file Writer.hpp.
|
inline |
Member function isTraceable returns true if currently tracing or tracing is enabled.
Definition at line 501 of file Writer.hpp.