The Debug Object class, this object represents one output device (ostream).
More...
#include <libcwd/debug.h>
Public Member Functions | |
| debug_string_ct & | margin () |
| The margin. More... | |
| debug_string_ct & | marker () |
| The marker. More... | |
| void | set_indent (unsigned short indentation) |
| Set number of spaces to indent. | |
| void | inc_indent (unsigned short indentation) |
| Increment number of spaces to indent. | |
| void | dec_indent (unsigned short indentation) |
| Decrement number of spaces to indent. | |
| unsigned short | get_indent () const |
| Get the current indentation. | |
| void | push_margin () |
| Push the current margin on a stack. | |
| void | pop_margin () |
| Pop margin from the stack. | |
| void | push_marker () |
| Push the current marker on a stack. | |
| void | pop_marker () |
| Pop marker from the stack. | |
| std::ostream * | get_ostream () const |
Get the ostream device as set with set_ostream(). | |
| debug_ct () | |
| Constructor. More... | |
| void | set_ostream (std::ostream *os) |
Set output device (single threaded applications).Assign a new ostream to this debug object (default is std::cerr). For use in single threaded applications only. | |
| template<class T > | |
| void | set_ostream (std::ostream *os, T *mutex) |
Set output device and provide external lock.Assign a new ostream to this debug object. The ostream will only be written to after obtaining the lock that is passed as second argument. Each ostream needs to have a unique lock. If the application also writes directly to the same ostream then use the same lock. More... | |
| void | off () |
| Turn this debug object off. | |
| void | on () |
| Cancel last call to off(). More... | |
The Debug Object class, this object represents one output device (ostream).
|
inline |
Constructor.
A debug object must be global.