libcwdversion 2.0.0
The C++ Debugging Support Library
Loading...
Searching...
No Matches
cwds_debug.h
Go to the documentation of this file.
1#pragma once
2
6
7//=============================================================================
8// Macros that are normally a part of cwds.
9
10// Test sources include cwd_sys.h first, optionally define the namespace
11// macro NAMESPACE_DEBUG, and then include this header.
12//
13// This configures LIBCWD_DEBUG_CHANNELS before processing <libcwd/debug.h>,
14// declares the application debug-channel namespace, and exposes
15// NAMESPACE_DEBUG_CHANNELS_START/END for defining custom channels.
16
17#ifndef NAMESPACE_DEBUG
18#define NAMESPACE_DEBUG debug
19#endif
20
21// It should never be necessary for the user to define NAMESPACE_DEBUG_START/END.
22#ifndef NAMESPACE_DEBUG_START
23#define NAMESPACE_DEBUG_START namespace NAMESPACE_DEBUG {
24#define NAMESPACE_DEBUG_END }
25#endif
26
27#ifndef NAMESPACE_CHANNELS
38#define NAMESPACE_CHANNELS channels
39#endif
40
41// The real code
42
43// It should never be necessary for the user to define LIBCWD_DEBUG_CHANNELS.
44#ifndef LIBCWD_DEBUG_CHANNELS
57#define LIBCWD_DEBUG_CHANNELS NAMESPACE_DEBUG::NAMESPACE_CHANNELS
58#endif
59
60#define NAMESPACE_DEBUG_CHANNELS_START namespace LIBCWD_DEBUG_CHANNELS::dc {
61#define NAMESPACE_DEBUG_CHANNELS_END }
62
63// End of cwds macros.
64//=============================================================================