File: debug_object.dox

package info (click to toggle)
libcwd 1.0.4-1.1
  • links: PTS
  • area: non-free
  • in suites: jessie, jessie-kfreebsd
  • size: 8,136 kB
  • ctags: 10,313
  • sloc: cpp: 23,354; sh: 9,798; ansic: 1,172; makefile: 852; exp: 234; awk: 11
file content (28 lines) | stat: -rw-r--r-- 1,392 bytes parent folder | download | duplicates (5)
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.&nbsp;
Such a %debug object can dynamically be turned \link libcwd::debug_ct::on on \endlink
and \link libcwd::debug_ct::off off \endlink.&nbsp;
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").&nbsp;
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.&nbsp;
The methods used for setting or changing these prefix formatting attributes are listed in \ref group_formatting.

*/