Open-RJ C/C++ User's Journal Synesis Software STLSoft - ... Robust, Lightweight, Cross-platform, Template Software ...

openrj/openrj_assert.h File Reference


Detailed Description

[C, C++] Assertions for the Open-RJ C-API

#include <assert.h>

Go to the source code of this file.

Defines

#define OPENRJ_ASSERT(expr)   assert(expr)
 Evaluates the expression, and aborts the program if it evaluates to zero/false.
#define openrj_assert(expr)   OPENRJ_ASSERT(expr)
 Defines a compile-time assertion.
#define OPENRJ_MESSAGE_ASSERT(m, x)   OPENRJ_ASSERT(((m), (x)))
 Assert macro for the Open-RJ API.


Define Documentation

#define openrj_assert ( expr   )     OPENRJ_ASSERT(expr)

Defines a compile-time assertion.

Parameters:
expr Must be non-zero, or compilation will fail.
Deprecated:
This is deprecated in favour of OPENRJ_ASSERT().
Note:
This is a simple #define for OPENRJ_ASSERT().

#define OPENRJ_ASSERT ( expr   )     assert(expr)

Evaluates the expression, and aborts the program if it evaluates to zero/false.

Note:
Resolves to an underlying assertion macro, and therefore will be inactive when the the underlying assertion macro is; usually in presence of NDEBUG or absence of _DEBUG.

#define OPENRJ_MESSAGE_ASSERT ( m,
 )     OPENRJ_ASSERT(((m), (x)))

Assert macro for the Open-RJ API.

If the given expressions evaluates to false (0), the execution is halted and an error message given.

Parameters:
m The literal string describing the failed condition
x The expression that must evaluate to true


Open-RJ Library documentation © Synesis Software Pty Ltd, 2004-2005