X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=common%2FclitkDD.h;h=c5a999629358e06be28d4f6232f047d8dc4f909c;hb=998ca9ca987553dc71578e5584e881f6bd537d91;hp=c5b52951b4851c48260fdcea17425df7549c8fbc;hpb=765020625fbc092d283e221e36c83e60a1844cb7;p=clitk.git diff --git a/common/clitkDD.h b/common/clitkDD.h index c5b5295..c5a9996 100644 --- a/common/clitkDD.h +++ b/common/clitkDD.h @@ -19,14 +19,25 @@ #define clitkDD_h #include - +#ifdef _WIN32 +# include +#endif // David's debug -#define DD(a) std::cout << #a " = [ " << a << " ]" << std::endl;std::cout.flush(); +#ifdef _WIN32 +# define DD(a) { \ + std::ostringstream ossDD; \ + ossDD << #a " = [ " << a << " ]" << std::endl; \ + OutputDebugString(ossDD.str().c_str()); \ + std::cout << ossDD.str() << std::endl; \ + } +#else +# define DD(a) std::cout << #a " = [ " << a << " ]" << std::endl;std::cout.flush(); +#endif #define DDV(a,n) { std::cout << #a " = [ "; for(unsigned int _i_=0; _i_ void _print_container(T const& a) { for(typename T::const_iterator i=a.begin();i!=a.end();++i) { std::cout << *i << " "; };} -#define DDS(a) { std::cout << #a " = [ "; _print_container(a) ; std::cout << " ]" << std::endl;std::cout.flush():} +#define DDS(a) { std::cout << #a " = [ "; _print_container(a) ; std::cout << " ]" << std::endl;std::cout.flush();} #endif