Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

DbC.h

Go to the documentation of this file.
00001 
00062 #if !defined(DBC_H)
00063 #define DBC_H
00064 
00065 #include <assert.h>
00066 
00067 #ifdef _DEBUG
00068 
00073 #define ASSERT(bool_expression) \
00074     if (! (bool_expression)) \
00075         _assert(#bool_expression, __FILE__, __LINE__ - 1)
00076 
00081 #define IS_VALID(obj) \
00082     ASSERT((obj) != NULL && (obj)->IsValid())
00083 
00089 #define REQUIRE(bool_expression) \
00090     ASSERT(bool_expression)
00091 
00096 #define ENSURE(bool_expression) \
00097     ASSERT(bool_expression)
00098 #else
00099 #define ASSERT(ignore) ((void)0)
00100 #define IS_VALID(ignore) ((void)0) 
00101 #define REQUIRE(ignore) ((void)0)
00102 #define ENSURE(ignore) ((void)0)
00103 #endif
00104 
00112 class DbC
00113 {
00114 #ifdef _DEBUG
00115     virtual bool IsValid(void) const = 0;
00116 #endif
00117 };
00118 
00119 #endif // !defined(DBC_H)



SourceForge.net Logo Generated on Sun Jan 23 11:36:34 2005 for Oracle Object Oriented Database Interface (O3DBI) by  doxygen 1.3.9.1