Go to the documentation of this file.
53 #define MESS_INIT(deb) std::ostringstream os; os<<deb
54 #define MESS_BEGIN(deb) MESS_INIT(deb)<<__FILE__ <<" ["<<__LINE__<<"] : "
55 #define MESS_END std::endl; LocalTraceBufferPool::instance()->insert(NORMAL_MESS, os.str().c_str());
56 #define MESS_ABORT std::endl; LocalTraceBufferPool::instance()->insert(ABORT_MESS, os.str().c_str());
59 #define MESSAGE_BEGIN(msg) {std::ostringstream ss; ss <<__FILE__ <<" ["<<__LINE__<<"] : "<< msg; LocalTraceBufferPool::instance()->insert(NORMAL_MESS, ss.str().c_str());}
60 #define MESSAGE_ADD(msg) {std::ostringstream ss; ss << msg; LocalTraceBufferPool::instance()->insert(NORMAL_MESS, ss.str().c_str());}
61 #define MESSAGE_END(msg) {std::ostringstream ss; ss << msg << std::endl; LocalTraceBufferPool::instance()->insert(NORMAL_MESS, ss.str().c_str());}
65 #define INFOS(msg) {MESS_BEGIN("- Trace ") << msg << MESS_END}
66 #define PYSCRIPT(msg) {MESS_INIT("---PYSCRIPT--- ") << msg << MESS_END}
67 #define INTERRUPTION(msg) {MESS_BEGIN("- INTERRUPTION: ")<< msg << MESS_ABORT}
70 #define IMMEDIATE_ABORT(code) {std::cout <<std::flush; \
71 std::cerr << "- ABORT " << __FILE__ << " [" <<__LINE__<< "] : " << std::flush; \
72 std::cerr << "ABORT return code= "<< code << std::endl; \
75 #define IMMEDIATE_ABORT(code) {std::cout <<std::flush; \
76 std::cerr << "- ABORT " << __FILE__ << " [" <<__LINE__<< "] : " << std::flush; \
77 std::cerr << "ABORT return code= "<< code << std::endl; \
83 #if defined ( __GNUC__ )
84 #define COMPILER "g++"
85 #elif defined ( __sun )
87 #elif defined ( __KCC )
88 #define COMPILER "KCC"
89 #elif defined ( __PGI )
90 #define COMPILER "pgCC"
91 #elif defined ( __alpha )
92 #define COMPILER "cxx"
94 #define COMPILER "undefined"
97 #ifdef INFOS_COMPILATION
98 #error INFOS_COMPILATION already defined
101 #if defined(_DEBUG_) || defined(_DEBUG)
105 #define INFOS_COMPILATION { MESS_BEGIN("COMPILED with ") << COMPILER \
106 << ", " << __DATE__ \
107 << " at " << __TIME__ << MESS_END }
109 #define MESSAGE(msg) {MESS_BEGIN("- Trace ") << msg << MESS_END}
110 #define SCRUTE(var) {MESS_BEGIN("- Trace ") << #var << "=" << var <<MESS_END}
112 #define REPERE ("------- ")
113 #define BEGIN_OF(msg) {MESS_BEGIN(REPERE) << "Begin of: " << msg << MESS_END}
114 #define END_OF(msg) {MESS_BEGIN(REPERE) << "Normal end of: " << msg << MESS_END}
117 #define ASSERT(condition) \
118 if (!(condition)){INTERRUPTION("CONDITION "<<#condition<<" NOT VERIFIED")}
124 #define INFOS_COMPILATION
125 #define MESSAGE(msg) {}
126 #define SCRUTE(var) {}
128 #define BEGIN_OF(msg) {}
129 #define END_OF(msg) {}
132 #define ASSERT(condition) {}