Classes | |
struct | trace_mask_changer |
A helper type to temporarily change the debug mask, then revert it at destruction. More... | |
Enumerations | |
enum | TraceFlags { TRACE_NEVER = 0x00000000, TRACE_TRIVIAL = 0x00000001, TRACE_INFO = 0x00000002, TRACE_WARNING = 0x00000004, TRACE_ERROR = 0x00000008, TRACE_CTOR = 0x00000010, TRACE_DTOR = 0x00000020, TRACE_CLEANUP = 0x00000040, TRACE_FACTORY_REG = 0x00000100, TRACE_FACTORY_LOOKUP = 0x00000200, TRACE_FACTORY_PLUGINS = 0x00000400, TRACE_FACTORY = 0x00000F00, TRACE_IO = 0x00001000, TRACE_NYI = 0x00010000, TRACE_FIXME = 0x00020000, TRACE_SATAN = 0x00040000, TRACE_ALWAYS = 0xffffffff } |
For use with the S11N_TRACE macro. More... | |
Functions | |
template<typename NodeT> | |
void | dump_node_structure (const NodeT &n, int indentlv=0) |
Dumps a tree-like view of n's structure, excluding properties, to cerr. | |
unsigned long | trace_mask (unsigned long f) |
Sets the active trace mask and returns the previous mask. | |
unsigned long | trace_mask () |
Returns the current trace mask. | |
std::ostream & | trace_stream () |
Returns the ostream used for tracing messages. | |
void | trace_stream (std::ostream &) |
Sets the ostream used for tracing messages. |
It is not intended for client-side use.
Debuggering macros:
S11N_TRACE_LEVELS is a bitmask of TraceFlags values. It defines which types of tracing are enabled by default. Code which should be "traced" should use the S11N_TRACE macro like this:
S11N_TRACE(TRACE_LEVEL) << "output ...\n";
The output will only be generated when S11N_TRACE_LEVELS is non-zero and the given TRACE_LEVEL mask matches the current value of trace_mask().
The mask may be changed at runtime by using the trace_mask() function, and set the default at compile time by defining S11N_TRACE_LEVELS before including s11n_debuggering_macros.hpp.
For use with the S11N_TRACE macro.
Definition at line 67 of file s11n_debuggering_macros.hpp.
void s11n::debug::dump_node_structure | ( | const NodeT & | n, | |
int | indentlv = 0 | |||
) |
Dumps a tree-like view of n's structure, excluding properties, to cerr.
The second parameter is for use by this function in recursion: do not pass a value for it.
unsigned long s11n::debug::trace_mask | ( | ) |
Returns the current trace mask.
unsigned long s11n::debug::trace_mask | ( | unsigned long | f | ) |
Sets the active trace mask and returns the previous mask.
void s11n::debug::trace_stream | ( | std::ostream & | ) |
Sets the ostream used for tracing messages.
std::ostream& s11n::debug::trace_stream | ( | ) |
Returns the ostream used for tracing messages.
Default is std::cerr.