![]() |
ostream
. The default debug output macros Dout and DoutFatal use the default debug object libcwd::libcw_do. Other debug objects may be created as global objects; it is convenient to define new macros for each (custom) debug object using the generic macros LibcwDout and LibcwDoutFatal.For example, add something like the following to your own "debug.h" file:
#ifdef CWDEBUG extern libcwd::debug_ct my_debug_object; #define MyDout(cntrl, data) LibcwDout(DEBUGCHANNELS, my_debug_object, cntrl, data) #define MyDoutFatal(cntrl, data) LibcwDoutFatal(DEBUGCHANNELS, my_debug_object, cntrl, data) #else // !CWDEBUG #define MyDout(a, b) #define MyDoutFatal(a, b) LibcwDoutFatal(::std,, a, b) #endif // !CWDEBUG
Copyright © 2001 - 2004 Carlo Wood. All rights reserved.