1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
/*!
\defgroup group_debug_object The Output Device (Debug Object)
\ingroup book_writing
*/
/*!
\page page_debug_object
\ingroup group_debug_object
<hr><h2>Detailed Description</h2>
Libcwd declares a %debug class (\ref libcwd::debug_ct "debug_ct") which can be assigned an <code>ostream</code>
to which %debug output will be written.
Such a %debug object can dynamically be turned \link libcwd::debug_ct::on on \endlink
and \link libcwd::debug_ct::off off \endlink.
When the %debug object is turned off, no %debug output is written to its \link group_destination ostream \endlink;
in fact, the data that otherwise would be written is
not even evaluated (see \ref libcwd::debug_ct::on "example").
The %debug code can also completely be omitted, by not defining the macro CWDEBUG.
Libcwd defines and uses only one %debug object: \ref libcwd::libcw_do "libcw_do" (the _do stands for %Debug Object).
However, it is possible to \link chapter_custom_do create more \endlink %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 \ref group_formatting.
*/
|