blob: fa835da3f033ada9cf379e9d3b132fb10086f9f0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
/**
* \file MBDebugHelper.h
* \brief DebugHelper.
* \author AKara
*/
#ifndef MB_DEBUG_HELPER_H
#define MB_DEBUG_HELPER_H
#include <cstdio>
/**
* \def DEBUG_ON
* \brief Switches on debug messages.
*/
//#define DEBUG_ON
#ifdef DEBUG_ON
/**
* \def DBG_MSG
* \brief Debug message output with file name and line number.
* \param x formatted debug message.
* \return printf construction.
*/
#define DBG_MSG(x) printf("%s:%d ", __FILE__, __LINE__);\
printf x
#else
#define DBG_MSG(x)
#endif
/**
* \def DBG_MSG_ERROR
* \brief Debug ERROR message output with file name and line number.
* \param x formatted debug message.
* \return printf construction.
*/
#define DBG_MSG_ERROR(x) printf("ERROR!!! %s:%d ", __FILE__, __LINE__);\
printf x
#endif /*MB_DEBUG_HELPER_H*/
|