47 #ifndef _MIRA_INSPECT_H_ 48 #define _MIRA_INSPECT_H_ 55 #include <boost/algorithm/string/split.hpp> 56 #include <boost/algorithm/string/classification.hpp> 82 #define MIRA_INSPECT( ... ) _MIRA_INSPECT(__VA_ARGS__, #__VA_ARGS__) 84 #define MIRA_INSPECT( ... ) 89 #define _MIRA_INSPECT_COMMON \ 90 std::string s(names); \ 91 std::vector<std::string> v; \ 92 boost::algorithm::split(v, s, boost::algorithm::is_from_range(',',',')); 94 #define _MIRA_INSPECT_END 100 std::cout << v[0] <<
"=" << a << std::endl;
104 template <
typename A,
typename B>
108 std::cout << v[0] <<
"=" << a << std::endl;
109 std::cout << v[1] <<
"=" << b << std::endl;
113 template <
typename A,
typename B,
typename C>
117 std::cout << v[0] <<
"=" << a << std::endl;
118 std::cout << v[1] <<
"=" << b << std::endl;
119 std::cout << v[2] <<
"=" << c << std::endl;
123 template <
typename A,
typename B,
typename C,
typename D>
124 void _MIRA_INSPECT(
const A& a,
const B& b,
const C& c,
const D& d,
const char* names)
127 std::cout << v[0] <<
"=" << a << std::endl;
128 std::cout << v[1] <<
"=" << b << std::endl;
129 std::cout << v[2] <<
"=" << c << std::endl;
130 std::cout << v[3] <<
"=" << d << std::endl;
134 template <
typename A,
typename B,
typename C,
typename D,
typename E>
136 const E& e,
const char* names)
139 std::cout << v[0] <<
"=" << a << std::endl;
140 std::cout << v[1] <<
"=" << b << std::endl;
141 std::cout << v[2] <<
"=" << c << std::endl;
142 std::cout << v[3] <<
"=" << d << std::endl;
143 std::cout << v[4] <<
"=" << e << std::endl;
147 template <
typename A,
typename B,
typename C,
typename D,
typename E,
150 const E& e,
const F& f,
const char* names)
153 std::cout << v[0] <<
"=" << a << std::endl;
154 std::cout << v[1] <<
"=" << b << std::endl;
155 std::cout << v[2] <<
"=" << c << std::endl;
156 std::cout << v[3] <<
"=" << d << std::endl;
157 std::cout << v[4] <<
"=" << e << std::endl;
158 std::cout << v[5] <<
"=" << f << std::endl;
162 template <
typename A,
typename B,
typename C,
typename D,
typename E,
163 typename F,
typename G>
165 const E& e,
const F& f,
const G& g,
const char* names)
168 std::cout << v[0] <<
"=" << a << std::endl;
169 std::cout << v[1] <<
"=" << b << std::endl;
170 std::cout << v[2] <<
"=" << c << std::endl;
171 std::cout << v[3] <<
"=" << d << std::endl;
172 std::cout << v[4] <<
"=" << e << std::endl;
173 std::cout << v[5] <<
"=" << f << std::endl;
174 std::cout << v[6] <<
"=" << g << std::endl;
178 #undef _MIRA_INSPECT_COMMON 179 #undef _MIRA_INSPECT_END #define _MIRA_INSPECT_COMMON
Definition: Inspect.h:89
void _MIRA_INSPECT(const A &a, const char *names)
Definition: Inspect.h:97
#define _MIRA_INSPECT_END
Definition: Inspect.h:94