MeVisLab Toolbox Reference
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
Variables
_
a
b
c
d
e
f
h
i
l
m
n
o
p
s
v
w
Typedefs
_
a
b
c
d
e
f
h
i
k
l
m
n
o
p
q
r
s
t
v
w
z
Enumerations
a
b
c
d
e
f
l
m
n
o
p
r
s
t
v
w
Enumerator
a
b
c
d
e
f
g
i
j
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
c
d
e
f
g
h
i
k
m
n
o
p
r
s
t
v
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Related Functions
:
a
b
c
d
e
f
g
h
i
k
l
m
o
p
r
s
t
v
w
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
c
f
g
h
i
m
o
p
r
s
Variables
_
c
i
k
m
p
r
s
v
w
Typedefs
c
d
e
f
g
h
i
m
p
s
t
u
v
Enumerations
a
b
c
d
e
f
h
k
l
m
n
p
r
s
t
v
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Macros
_
a
c
d
e
g
i
l
m
n
o
p
r
s
t
u
v
w
x
mlDebug.h
Go to the documentation of this file.
1
/*************************************************************************************
2
**
3
** Copyright 2007, MeVis Medical Solutions AG
4
**
5
** The user may use this file in accordance with the license agreement provided with
6
** the Software or, alternatively, in accordance with the terms contained in a
7
** written agreement between the user and MeVis Medical Solutions AG.
8
**
9
** For further information use the contact form at https://www.mevislab.de/contact
10
**
11
**************************************************************************************/
12
13
#ifndef ML_DEBUG_H
14
#define ML_DEBUG_H
15
17
67
#include "
mlErrorOutput.h
"
68
#include "
mlErrorOutputInfos.h
"
69
70
//--------------------------------------------------------------------------------------------
71
//
74
//
75
//--------------------------------------------------------------------------------------------
76
77
78
//--------------------------------------------------------------------------------------------
81
//--------------------------------------------------------------------------------------------
82
#ifdef _DEBUG
83
// Implements outputting debug information in debug mode.
84
#define _mlDebugConst(ENV_VAR, COUTS) \
85
{ \
86
/* Print debug infor only if global debug state is non zero. */
\
87
if ((ML_NAMESPACE::MLErrorOutput.getMessageFilter() & ML_DEBUG) || \
88
(ML_NAMESPACE::MLErrorOutput.isFullDebuggingOn())){ \
89
/* Redirect debug output into a stream buffer. */
\
90
/* Be sure that the stream is terminated to avoid crashes. */
\
91
std::stringstream __ML_local_TMp_streamBuFfer; \
92
__ML_local_TMp_streamBuFfer << COUTS << '\0'; \
93
ML_NAMESPACE::MLErrorOutput.handleDebugPrint(ENV_VAR, \
94
ML_PREFIX, \
95
__ML_local_TMp_streamBuFfer, \
96
__FILE__, \
97
__LINE__); \
98
} \
99
}
100
#else
101
// Do not code anything in release mode.
102
#define _mlDebugConst(ENV_VAR, COUTS)
103
#endif
104
105
//--------------------------------------------------------------------------------------------
109
//--------------------------------------------------------------------------------------------
110
#define mlDebugConst(ENV_VAR, COUTS) _mlDebugConst(ENV_VAR, COUTS)
111
112
//--------------------------------------------------------------------------------------------
121
//--------------------------------------------------------------------------------------------
122
#ifdef _DEBUG
123
#define mlDebug(COUTS) { const RuntimeType *rt = getClassTypeId(); \
124
ML_CHECK_RUNTIME_TYPE(rt); \
125
_mlDebugConst(std::string{ML_CONSTANT_PREFIX}+ \
126
rt->getName(), \
127
COUTS); \
128
}
129
#else
130
#define mlDebug(COUTS)
131
#endif
132
133
//--------------------------------------------------------------------------------------------
160
//--------------------------------------------------------------------------------------------
161
#ifdef _DEBUG
162
#define mlDebugConditional(COND_SYM, COUTS) \
163
{ \
164
const RuntimeType *rt = getClassTypeId(); \
165
ML_CHECK_RUNTIME_TYPE(rt); \
166
_mlDebugConst(std::string{ML_CONSTANT_PREFIX} + \
167
rt->getName() +"-"
+ (COND_SYM), \
168
COUTS); \
169
mlDebug(COUTS); \
170
}
171
#else
172
#define mlDebugConditional(COND_SYM, COUTS)
173
#endif
174
175
//--------------------------------------------------------------------------------------------
183
//--------------------------------------------------------------------------------------------
184
#define mlDebugPrint(COUTS) _mlDebugConst(ML_DEBUG_ENV_NAME, COUTS)
185
186
//--------------------------------------------------------------------------------------------
195
//--------------------------------------------------------------------------------------------
196
#ifdef _DEBUG
197
#define mlDebugClass(CLASS_NAME, COUTS) { const RuntimeType *rt = CLASS_NAME::getClassTypeId(); \
198
ML_CHECK_RUNTIME_TYPE(rt); \
199
_mlDebugConst(std::string{ML_CONSTANT_PREFIX} + \
200
rt->getName(), \
201
COUTS); \
202
}
203
#else
204
#define mlDebugClass(CLASS_NAME, COUTS)
205
#endif
207
208
209
#endif
// End of __mlDebug_H
mlErrorOutputInfos.h
mlErrorOutput.h
MeVis
Foundation
Sources
MLUtilities
mlDebug.h
Generated by
1.9.1