42 #ifndef MAT_DEBUGPOLICIES
43 #define MAT_DEBUGPOLICIES
49 #define ASSERTALWAYS(x) \
50 this->assertAlways(__FILE__, __LINE__, __DATE__, __TIME__,x)
51 #define ASSERTDEBUG(x) \
52 this->assertDebug(__FILE__, __LINE__, __DATE__, __TIME__,x)
55 class DebugLevelHigh {
57 void assertAlways(
char const * theFile,
int const theLine,
58 char const * theDate,
char const * theTime,
59 bool const statement)
const {
61 std::cout<<
"Assertion failed: "<<theFile<<
":"<<theLine
62 <<
" Compiled on "<<theDate<<
" at "<<theTime<<
".\n";
66 inline void assertDebug(
char const * theFile,
int const theLine,
67 char const * theDate,
char const * theTime,
68 bool const statement)
const {
69 assertAlways(theFile, theLine, theDate, theTime, statement);
72 class DebugLevelMedium :
public DebugLevelHigh {};
73 class DebugLevelLow :
public DebugLevelMedium {
75 inline void assertDebug(
char const * theFile,
int const theLine,
76 char const * theDate,
char const * theTime,
77 bool const statement)
const {}
83 #define ASSERTALWAYS(x) \
84 this->assertAlways(__FILE__, __LINE__, __ID__,x)
85 #define ASSERTDEBUG(x) \
86 this->assertDebug(__FILE__, __LINE__, __ID__,x)
92 char const * theId,
bool const statement)
const {
94 std::cout<<
"Assertion failed: "<<theFile<<
":"<<theLine
95 <<
" svn info: "<<theId<<
".\n";
99 inline void assertDebug(
char const * theFile,
int const theLine,
100 char const * theId,
bool const statement)
const {
108 char const * theId,
bool const statement)
const {}
Definition: DebugPolicies.h:104
void assertDebug(char const *theFile, int const theLine, char const *theId, bool const statement) const
Definition: DebugPolicies.h:107
void assertDebug(char const *theFile, int const theLine, char const *theId, bool const statement) const
Definition: DebugPolicies.h:99
Definition: DebugPolicies.h:89
Definition: DebugPolicies.h:105
void assertAlways(char const *theFile, int const theLine, char const *theId, bool const statement) const
Definition: DebugPolicies.h:91