VR-Engage  2.2
Loading...
Searching...
No Matches
assert.h File Reference
Include dependency graph for assert.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  makVre
 

Macros

#define ASSERT_BREAK   asm("int $3");
 
#define DtASSERT(exp, description)
 
#define DtDEV_ASSERT(exp, description)
 

Functions

UTIL_DLL bool makVre::customAssert (bool condition, const char *expression, const char *description, int line, const char *file, const char *function, bool *handled)
 

Macro Definition Documentation

◆ ASSERT_BREAK

#define ASSERT_BREAK   asm("int $3");

Platform-specific debugger break instruction for non-Windows platforms.

◆ DtASSERT

#define DtASSERT ( exp,
description )
Value:
{ \
static bool ignoreAlways = false; \
if (!ignoreAlways) \
{ \
if (makVre::customAssert(bool(exp), #exp, description, __LINE__, __FILE__, __FUNCTION__, &ignoreAlways)) \
{ \
} \
} \
}
#define ASSERT_BREAK
Platform-specific debugger break instruction for non-Windows platforms.
Definition assert.h:25
UTIL_DLL bool customAssert(bool condition, const char *expression, const char *description, int line, const char *file, const char *function, bool *handled)
Custom assertion function that evaluates conditions and handles failures.

Primary assertion macro for runtime validation.

This macro takes an expression that evaluates to true/false and a text description. If the expression evaluates to false, this will show an assertion dialog (on Windows) or output a console message (on Linux) with options to Abort, Retry, or Ignore.

  • Abort: breaks into the debugger
  • Retry: continues running, but the assertion will fire again if the expression evaluates to false again
  • Ignore: suppresses this assertion and continues running
Parameters
expThe expression to evaluate
descriptionDescriptive message about the assertion condition

Referenced by makVre::DtSpSubClass< SELF_T, SUPER_T >::create(), makVre::DtSpSubClass< SELF_T, SUPER_T >::createVersion(), makVre::DtInitTable::findData(), makVre::DtLuaState::get(), and makVre::DtLuaState::push().

◆ DtDEV_ASSERT

#define DtDEV_ASSERT ( exp,
description )
Value:
{ \
static bool ignoreAlways = false; \
if (!ignoreAlways) \
{ \
if (makVre::customAssert(bool(exp), #exp, description, __LINE__, __FILE__, __FUNCTION__, &ignoreAlways)) \
{ \
} \
} \
}

Development-only assertion macro.

Similar to DtASSERT but only active in development builds. This assertion is disabled in nightly builds to avoid disrupting automated testing.

Parameters
expThe expression to evaluate
descriptionDescriptive message about the assertion condition