54 #define MESS_INIT(deb) std::ostringstream os; os<<deb
55 #define MESS_BEGIN(deb) MESS_INIT(deb)<<__FILE__ <<" ["<<__LINE__<<"] : "
56 #define MESS_END std::endl; LocalTraceBufferPool::instance()->insert(NORMAL_MESS, os.str().c_str());
57 #define MESS_ABORT std::endl; LocalTraceBufferPool::instance()->insert(ABORT_MESS, os.str().c_str());
60 #define MESSAGE_BEGIN(msg) {std::ostringstream ss; ss <<__FILE__ <<" ["<<__LINE__<<"] : "<< msg; LocalTraceBufferPool::instance()->insert(NORMAL_MESS, ss.str().c_str());}
61 #define MESSAGE_ADD(msg) {std::ostringstream ss; ss << msg; LocalTraceBufferPool::instance()->insert(NORMAL_MESS, ss.str().c_str());}
62 #define MESSAGE_END(msg) {std::ostringstream ss; ss << msg << std::endl; LocalTraceBufferPool::instance()->insert(NORMAL_MESS, ss.str().c_str());}
66 #define INFOS(msg) {MESS_BEGIN("- Trace ") << msg << MESS_END}
67 #define BRIEF_INFOS(msg) {std::cout << msg << std::endl;}
68 #define PYSCRIPT(msg) {MESS_INIT("---PYSCRIPT--- ") << msg << MESS_END}
69 #define INTERRUPTION(msg) {MESS_BEGIN("- INTERRUPTION: ")<< msg << MESS_ABORT}
72 #define IMMEDIATE_ABORT(code) {std::cout <<std::flush; \
73 std::cerr << "- ABORT " << __FILE__ << " [" <<__LINE__<< "] : " << std::flush; \
74 std::cerr << "ABORT return code= "<< code << std::endl; \
77 #define IMMEDIATE_ABORT(code) {std::cout <<std::flush; \
78 std::cerr << "- ABORT " << __FILE__ << " [" <<__LINE__<< "] : " << std::flush; \
79 std::cerr << "ABORT return code= "<< code << std::endl; \
85 #if defined ( __GNUC__ )
86 #define COMPILER "g++"
87 #elif defined ( __sun )
89 #elif defined ( __KCC )
90 #define COMPILER "KCC"
91 #elif defined ( __PGI )
92 #define COMPILER "pgCC"
93 #elif defined ( __alpha )
94 #define COMPILER "cxx"
95 #elif defined ( _MSC_VER )
96 #define COMPILER "cl.exe"
98 #define COMPILER "undefined"
101 #ifdef INFOS_COMPILATION
102 #error INFOS_COMPILATION already defined
108 #define INFOS_COMPILATION { if (SALOME::VerbosityActivated()) { MESS_BEGIN("COMPILED with ") << COMPILER \
109 << ", " << __DATE__ \
110 << " at " << __TIME__ << MESS_END }}
113 #define MESSAGE(msg) { if (SALOME::VerbosityActivated()) {MESS_BEGIN("- Trace ") << msg << MESS_END}}
114 #define SCRUTE(var) { if (SALOME::VerbosityActivated()) {MESS_BEGIN("- Trace ") << #var << "=" << var <<MESS_END}}
116 #define REPERE ("------- ")
117 #define BEGIN_OF(msg) { if (SALOME::VerbosityActivated()) {MESS_BEGIN(REPERE) << "Begin of: " << msg << MESS_END}}
118 #define END_OF(msg) { if (SALOME::VerbosityActivated()) {MESS_BEGIN(REPERE) << "Normal end of: " << msg << MESS_END}}
121 #define ASSERT(condition) \
122 { if (SALOME::VerbosityActivated()) { \
123 if (!(condition)){INTERRUPTION("CONDITION "<<#condition<<" NOT VERIFIED")} \