Warning: you were redirected to the latest documentation corresponding to your major release ( 2018.1.11.6987 ). Should you wish to access your specific version's documentation, please download the offline documentation from the Audiokinetic Launcher and check the Offline Documentation option in Wwise Authoring.
Go to the documentation of this file.
28 #ifndef _AK_AKASSERT_H_
29 #define _AK_AKASSERT_H_
31 #if defined( _DEBUG ) && !(defined AK_DISABLE_ASSERTS)
32 #ifndef AK_ENABLE_ASSERTS
33 #define AK_ENABLE_ASSERTS
37 #if !defined( AKASSERT )
42 #if defined( AK_ENABLE_ASSERTS )
44 #ifndef AK_ASSERT_HOOK
46 const char * in_pszExpression,
47 const char * in_pszFileName,
50 #define AK_ASSERT_HOOK
56 #define AKASSERT(Condition) ((Condition) ? ((void) 0) : g_pAssertHook( #Condition, __FILE__, __LINE__) )
59 #define AKVERIFY AKASSERT
62 #define AKASSERTD AKASSERT
64 #define AKASSERTD(Condition) ((void)0)
67 #else // defined( AK_ENABLE_ASSERTS )
69 #define AKASSERT(Condition) ((void)0)
70 #define AKASSERTD(Condition) ((void)0)
71 #define AKVERIFY(x) ((void)(x))
73 #endif // defined( AK_ENABLE_ASSERTS )
75 #define AKASSERT_RANGE(Value, Min, Max) (AKASSERT(((Value) >= (Min)) && ((Value) <= (Max))))
77 #define AKASSERTANDRETURN( __Expression, __ErrorCode )\
80 AKASSERT(__Expression);\
84 #define AKASSERTPOINTERORFAIL( __Pointer ) AKASSERTANDRETURN( __Pointer != NULL, AK_Fail )
85 #define AKASSERTSUCCESSORRETURN( __akr ) AKASSERTANDRETURN( __akr == AK_Success, __akr )
87 #define AKASSERTPOINTERORRETURN( __Pointer ) \
88 if ((__Pointer) == NULL)\
90 AKASSERT((__Pointer) == NULL);\
94 #if defined( AK_WIN ) && ( _MSC_VER >= 1600 )
96 #define AKSTATICASSERT( __expr__, __msg__ ) static_assert( (__expr__), (__msg__) )
99 #define AKSTATICASSERT( __expr__, __msg__ ) typedef char __AKSTATICASSERT__[(__expr__)?1:-1]
102 #endif // ! defined( AKASSERT )
104 #ifdef AK_ENABLE_ASSERTS
108 #define DEFINEDUMMYASSERTHOOK void AkAssertHookFunc( \
109 const char* in_pszExpression,\
110 const char* in_pszFileName,\
115 AkAssertHook g_pAssertHook = AkAssertHookFunc;
117 #define DEFINEDUMMYASSERTHOOK
#define AK_CALLBACK(__TYPE__, __NAME__)
#define AKSOUNDENGINE_API
void(* AkAssertHook)(const char *in_pszExpression, const char *in_pszFileName, int in_lineNumber)
Tell us about your project. We're here to help.
Register your project and we'll help you get started with no strings attached!
Get started with Wwise