1 // This header file is an example of how to write a "debug.h" file
2 // in the case that your application want to define its own debug channels.
3 // This example belongs to 'threads.cc'.
4 
5 #ifndef DEBUG_H
6 #define DEBUG_H
7 
8 #ifndef CWDEBUG               // This is needed so that others can compile
9 #include "nodebug.h"          //   your application without having libcwd installed.
10 			      //   nodebug.h is distributed with the libcwd package
11 			      //   but must be included in your own package.
12 			      // Note: you can also just copy nodebug.h here.
13 #else // CWDEBUG
14 
15 // Define the namespace where you will put your debug channels.
16 // This can be any arbitrary namespace except std:: or ::.
17 #define DEBUGCHANNELS debug_channels
18 #include <libcwd/debug.h>
19 
20 namespace debug_channels {    // This is namespace DEBUGCHANNELS
21   namespace dc {
22     using namespace libcwd::channels::dc;
23 
24     // Add custom debug channels here.
25     extern libcwd::channel_ct hello;
26   }
27 }
28 
29 #endif // CWDEBUG
30 #endif // DEBUG_H
31