39 |
* debugging. |
* debugging. |
40 |
*/ |
*/ |
41 |
namespace Debug { |
namespace Debug { |
42 |
|
|
43 |
|
extern std::ostream *debugStream(); |
44 |
|
|
45 |
/** A macro to get a reference to a debug variable. |
/** A macro to get a reference to a debug variable. |
46 |
* Example: |
* Example: |
47 |
* <pre> |
* <pre> |
84 |
* if(dbg) cout << |
* if(dbg) cout << |
85 |
* </pre> |
* </pre> |
86 |
*/ |
*/ |
87 |
#define DBG(cname) if(!cname);else (std::cout << cname##___DBGNAME << ": ") |
#define DBG(cname) if(!cname);else ((*(::Vob::Debug::debugStream())) << cname##___DBGNAME << ": ") |
88 |
|
|
89 |
/** Get a variable reference by name. |
/** Get a variable reference by name. |
90 |
* If the name does not exist, a new name is created with an |
* If the name does not exist, a new name is created with an |