Detailed Description
Libcwd declares a debug class (
debug_ct) which can be assigned an
ostream
to which debug output will be written. Such a debug object can dynamically be turned
on and
off . When the debug object is turned off, no debug output is written to its
ostream ; in fact, the data that otherwise would be written is not even evaluated (see
example). The debug code can also completely be omitted, by not defining the macro CWDEBUG.Libcwd defines and uses only one debug object:
libcw_do (the _do stands for Debug Object). However, it is possible to
create more debug objects which would allow one to write debug output to two or more different output devices at the same time (for instance, the screen and a file).For each debug object it is possible to set a margin and a marker string and to set the size of the current indentation. The methods used for setting or changing these prefix formatting attributes are listed in
Format Of The Debug Output.