Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

/magnus/back_end/AProducts/include/CONDITION.h

Go to the documentation of this file.
00001 #ifndef __CONDITION_H__
00002 #define __CONDITION_H__
00003 
00004 #define WARNING 1
00005 #define ERROR   2
00006 
00007 void debugMessage( int msgType, bool condition, const char *condDescription, 
00008                    const char *fileName, int lineno );
00009 
00010 
00011 #define PRECONDITION(type,condition)    debugMessage( (type), (condition), "PRECONDITION "###condition, __FILE__, __LINE__)
00012 #define CONDITION(type,condition)       debugMessage( (type), (condition), "CONDITION "###condition, __FILE__, __LINE__)
00013 
00014 
00015 
00016 /*
00017  * @dp old macros:
00018 #define __DP_ASSERT(header,type,condition)    \
00019   do {                                  \
00020    if( !(condition) ) {                 \
00021       cout << endl;                     \
00022       if( (type) == WARNING )           \
00023         cout << "WARNING: ";            \
00024       else if( (type) == ERROR )        \
00025         cout << "ERROR: ";              \
00026     cout << endl << __FILE__ << ":" << __LINE__ << ": " \
00027          << header << " \"" << #condition << "\" is false." << endl; \
00028    }                                    \
00029   } while( 0 )
00030 
00031 
00032 #define PRECONDITION(type,condition)    __DP_ASSERT("PRECONDITION",(type),(condition))
00033 #define CONDITION(type,condition)       __DP_ASSERT("CONDITION",(type),(condition))
00034 */
00035 #endif

Generated at Tue Jun 19 09:49:34 2001 for Magnus Classes by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001