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 29 30 31 32 33 34 35 36 37
|
/*!
\defgroup book_writing_intro Writing Debug Output: Introduction
\ingroup book_writing
*/
/*!
\page page_writing_into
\ingroup book_writing_intro
\section section_writing_into_introduction Introduction
Libcwd is an <code>ostream</code> oriented debug output facility.
The class libcwd::debug_ct represents a single <code>ostream</code>.
Libcwd defines and internally uses only one object of that class, called a \ref group_debug_object "debug object",
being libcwd::libcw_do.
Debug output is written using \ref page_why_macro "macros" (\ref Dout and \ref DoutFatal),
both of which are defined to use libcwd::libcw_do.
More general macros exist (\ref LibcwDout and \ref LibcwDoutFatal) that allow you
to use a different (\ref chapter_custom_do "custom") debug object.
\ref Dout and \ref DoutFatal take two arguments: the first argument is used to specify
\ref group_debug_channels "debug channels" and \ref group_control_flags "control flags"
while the second argument should be a series of objects seperated by <code><<</code>
that you want to write to the <code>ostream</code>.
For example,
\code
Dout(dc::notice|blank_label_cf|flush_cf, "Total count: " << count << "; Average: " << average);
\endcode
In this example <code>dc::notice</code> is one of the \ref group_default_dc "predefined" debug channels.
Debug channels are intended to control the amount of output of your application:
you can switch the channels on and off.
*/
|