Board 0.9.6
Debug.h
Go to the documentation of this file.
1/* -*- mode: c++ -*- */
26#ifndef BOARD_DEBUG_H
27#define BOARD_DEBUG_H
28
29#ifdef _BOARD_DEBUG_
30#define ENTERING std::cout << "[" << __PRETTY_FUNCTION__ << "] <<Entering>>" << std::endl;
31#define LEAVING std::cout << "[" << __PRETTY_FUNCTION__ << "] <<Leaving>>" << std::endl;
32#define TRACE std::cout << "[" << __PRETTY_FUNCTION__ << "]" << std::endl;
33#define TSHOW(V) std::cout << "[" << __PRETTY_FUNCTION__ << ":" << __LINE__ << "] " << #V << " = " << (V) << std::endl;
34#define LSHOW(V) std::cout << "[" << __FILE__ << ":" << __LINE__ << "] " << #V << " = " << (V) << std::endl;
35#define MSHOW(MESSAGE, V) std::cout << "[" << __FILE__ << ":" << __LINE__ << "] (" << (MESSAGE) << ") " << #V << " = " << (V) << std::endl;
36#define SHOW(V) std::cout << #V << " = " << (V) << std::endl;
37#else
38#define ENTERING while (false)
39#define LEAVING while (false)
40#define TRACE \
41 while (false) \
42 std::cerr << ""
43#define TSHOW(V) \
44 while (false) \
45 std::cerr << ""
46#define LSHOW(V) \
47 while (false) \
48 std::cerr << ""
49#define MSHOW(MESSAGE, V) \
50 while (false) \
51 std::cerr << ""
52#define SHOW(V) \
53 while (false) \
54 std::cerr << ""
55#endif
56
57#endif // BOARD_EXCEPTION_H