Main Page Modules Namespaces C++ Classes Compound List File List Index
tnlAssert.h File Reference

tnlAssert.h File Reference

#include "tnlTypes.h"

Namespaces

namespace  TNL

Defines

#define TNLAssert(x, y)   { if (!bool(x)) { TNL::Assert::processAssert( __FILE__, __LINE__, y); TNL_DEBUGBREAK(); } }
 Assert that the statement x is true, otherwise halt.

#define TNLAssertV(x, y)   { if (!bool(x)) { TNL::Assert::processAssert(__FILE__, __LINE__, avar y); TNL_DEBUGBREAK(); } }
 TNLAssertV - same as TNLAssert, except that the message y must be a parenthesized printf-style variable argument list.


Define Documentation

#define TNLAssert x,
 )     { if (!bool(x)) { TNL::Assert::processAssert( __FILE__, __LINE__, y); TNL_DEBUGBREAK(); } }
 

Assert that the statement x is true, otherwise halt.

If the statement x is true, continue processing. If the statement x is false, log the file and line where the assert occured, the message y and displaying a dialog containing the message y. The user then has the option to halt or continue causing the debugger to break. These asserts are only present when TNL_ENABLE_ASSERTS is defined. This assert is very useful for verifying data as well as function entry and exit conditions.

#define TNLAssertV x,
 )     { if (!bool(x)) { TNL::Assert::processAssert(__FILE__, __LINE__, avar y); TNL_DEBUGBREAK(); } }
 

TNLAssertV - same as TNLAssert, except that the message y must be a parenthesized printf-style variable argument list.

These asserts are only present in DEBUG builds.