45#ifndef DOXYGEN_SHOULD_SKIP_THIS
63# define GUM_DEEP_TRACE_ON
66# define GUM_ASSERT(condition) \
70 std::cout << std::endl \
71 << __FILE__ << ":" << __LINE__ << " [aGrUM] assert (" << #condition \
72 << ") failed" << std::endl; \
78# define GUM_DEBUG_ONLY(x) {x}
82# define GUM_CONSTRUCTOR_BASIC(x) \
84 gum::__debug__::_inc_creation_(#x, \
91# define GUM_CONSTRUCTOR(x) GUM_CONSTRUCTOR_BASIC(x);
95# define GUM_DESTRUCTOR_BASIC(x) \
96 { gum::__debug__::_inc_deletion_(#x, __FILE__, __LINE__, "destructor of", (void*)this); }
97# define GUM_DESTRUCTOR(x) GUM_DESTRUCTOR_BASIC(x);
101# define GUM_CONS_CPY_BASIC(x) \
103 gum::__debug__::_inc_creation_(#x, \
106 "copy constructor of", \
110# define GUM_CONS_CPY(x) GUM_CONS_CPY_BASIC(x);
114# define GUM_CONS_MOV_BASIC(x) \
116 gum::__debug__::_inc_creation_(#x, \
119 "move constructor of", \
123# define GUM_CONS_MOV(x) GUM_CONS_MOV_BASIC(x)
127# define GUM_OP_CPY_BASIC(x) \
128 { gum::__debug__::_show_trace_(#x, __FILE__, __LINE__, "copy operator of", (void*)this); }
129# define GUM_OP_CPY(x) GUM_OP_CPY_BASIC(x)
132# define GUM_OP_MOV_BASIC(x) \
133 { gum::__debug__::_show_trace_(#x, __FILE__, __LINE__, "move operator of", (void*)this); }
134# define GUM_OP_MOV(x) GUM_OP_MOV_BASIC(x)
138# define GUM_ASSERT(condition)
139# define GUM_CONSTRUCTOR(x) ;
140# define GUM_DESTRUCTOR(x) ;
141# define GUM_CONS_CPY(x) ;
142# define GUM_CONS_MOV(x) ;
143# define GUM_OP_CPY(x) ;
144# define GUM_OP_MOV(x) ;
146# define GUM_DEBUG_ONLY(x)
151# define _GUM_PRINT(file, line, msg) \
153 std::string ff(file); \
154 std::cout << file << ":" << line << " [GUM] " << msg << std::endl; \
157# define GUM_CHECKPOINT _GUM_PRINT(__FILE__, __LINE__, "******** checkpoint ********")
158# define GUM_TRACE(msg) _GUM_PRINT(__FILE__, __LINE__, msg)
159# define GUM_TRACE_VAR(var) _GUM_PRINT(__FILE__, __LINE__, "<" << #var << ">: " << var)
161# define GUM_TRACE_NEWLINE \
162 { std::cout << std::endl; }
164# define _GUM_PRINT(line, file, x)
165# define GUM_CHECKPOINT
166# define GUM_TRACE(msg)
167# define GUM_TRACE_VAR(var)
168# define GUM_TRACE_NEWLINE
173# ifdef GUM_DEBUG_MODE
177 std::string _getFile_(
const char* f);
179 void _show_trace_(
const char* zeKey,
184 void _inc_creation_(
const char* zeKey,
190 void _inc_deletion_(
const char* zeKey,
195 void _dec_creation_(
const char* zeKey,
200 void _dumpObjects_();
211 class Debug:
public std::string {
212 using std::string::string;
void _atexit_()
Used for debug purpose.
Internal namespace for aGrUM debugging tools.
gum is the global namespace for all aGrUM entities