Classes | Namespaces | Macros
BeAssert.h File Reference

Provides Bentley specific assert functions (Bentley/BeAssert.h). More...

#include "Bentley.h"
#include <assert.h>

Go to the source code of this file.


struct  BeAssertFunctions


 The Bentley namespace contains types defined by the Bentley Library.


#define BeAssert(_Expression)   (void)( (!!(_Expression)) || (BeAssertFunctions::PerformBeAssert(_CRT_WIDE(#_Expression), _CRT_WIDE(__FILE__), __LINE__), 0) )
 BeAssert performs the same function as the standard assert, plus it prevents the most common cases of recursive assertion failures in the Application. More...
#define BeAssertOnce(_Expression)

Detailed Description

Provides Bentley specific assert functions (Bentley/BeAssert.h).

Macro Definition Documentation

#define BeAssert (   _Expression)    (void)( (!!(_Expression)) || (BeAssertFunctions::PerformBeAssert(_CRT_WIDE(#_Expression), _CRT_WIDE(__FILE__), __LINE__), 0) )
#define BeAssertOnce (   _Expression)
do { \
static int st_bAssertedOnce = 0; \
if (!st_bAssertedOnce) \
{ \
(!!(_Expression)) || (BeAssertFunctions::PerformBeAssert(_CRT_WIDE(#_Expression), _CRT_WIDE(__FILE__), __LINE__), 0); \
st_bAssertedOnce = 1; \
} \
} while (0)
static void PerformBeAssert(wchar_t const *_Message, wchar_t const *_File, unsigned _Line)
Instigate an assert. This will call a host method first. Normally this is only called from BeAssert...

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.