]> Creatis software - clitk.git/blob - common/clitkDD.h
d5fa1012471bb3b8eaa851bf44fc5c125cca0b60
[clitk.git] / common / clitkDD.h
1 #ifndef clitkDD_h
2 #define clitkDD_h
3
4 #include <iostream>
5
6 // David's debug
7
8 #define DD(a) std::cout << #a " = [ " << a << " ]" << std::endl;std::cout.flush();
9 #define DDV(a,n) { std::cout << #a " = [ "; for(unsigned int _i_=0; _i_<n; _i_++) { std::cout << a[_i_] << " "; }; std::cout << " ]" << std::endl;std::cout.flush();}
10   template<class T>
11     void _print_container(T const& a)
12     { for(typename T::const_iterator i=a.begin();i!=a.end();++i) { std::cout << *i << " "; };}
13 #define DDS(a) { std::cout << #a " = [ "; _print_container(a) ; std::cout << " ]" << std::endl;std::cout.flush():}
14
15 #endif