이 파일의 문서화 페이지로 가기
27 #ifndef _AK_AKASSERT_H_
28 #define _AK_AKASSERT_H_
30 #if defined( _DEBUG ) && !(defined AK_DISABLE_ASSERTS)
31 #ifndef AK_ENABLE_ASSERTS
32 #define AK_ENABLE_ASSERTS
36 #ifdef AK_ENABLE_ASSERTS
38 #ifndef AK_ASSERT_HOOK
40 const char * in_pszExpression,
41 const char * in_pszFileName,
44 #define AK_ASSERT_HOOK
48 #if !defined( AKASSERT )
51 #if defined( AK_ENABLE_ASSERTS )
55 #define AKASSERT(Condition) ((Condition) ? ((void) 0) : g_pAssertHook( #Condition, __FILE__, __LINE__) )
57 #define AKVERIFY AKASSERT
60 #define AKASSERTD AKASSERT
62 #define AKASSERTD(Condition) ((void)0)
65 #else // defined( AK_ENABLE_ASSERTS )
67 #define AKASSERT(Condition) do { switch ( 0 ) { case 0: break; default: if ( !( Condition ) ) {} } } while ( 0 )
69 #define AKVERIFY(x) ((void)(x))
72 #define AKASSERTD AKASSERT
74 #define AKASSERTD(Condition) ((void)0)
77 #endif // defined( AK_ENABLE_ASSERTS )
79 #define AKASSERT_RANGE(Value, Min, Max) (AKASSERT(((Value) >= (Min)) && ((Value) <= (Max))))
81 #define AKASSERTANDRETURN( __Expression, __ErrorCode )\
84 AKASSERT(__Expression);\
88 #define AKASSERTPOINTERORFAIL( __Pointer ) AKASSERTANDRETURN( __Pointer != NULL, AK_Fail )
89 #define AKASSERTSUCCESSORRETURN( __akr ) AKASSERTANDRETURN( __akr == AK_Success, __akr )
91 #define AKASSERTPOINTERORRETURN( __Pointer ) \
92 if ((__Pointer) == NULL)\
94 AKASSERT((__Pointer) == NULL);\
98 #if defined( AK_WIN ) && ( _MSC_VER >= 1600 )
100 #define AKSTATICASSERT( __expr__, __msg__ ) static_assert( (__expr__), (__msg__) )
103 #define AKSTATICASSERT( __expr__, __msg__ ) typedef char __AKSTATICASSERT__[(__expr__)?1:-1]
106 #endif // ! defined( AKASSERT )
108 #ifdef AK_ENABLE_ASSERTS
112 #define DEFINEDUMMYASSERTHOOK void AkAssertHookFunc( \
113 const char* in_pszExpression,\
114 const char* in_pszFileName,\
119 AkAssertHook g_pAssertHook = AkAssertHookFunc;
121 #define DEFINEDUMMYASSERTHOOK
#define AKSOUNDENGINE_API
#define AK_CALLBACK(_type, _name)
void(* AkAssertHook)(const char *in_pszExpression, const char *in_pszFileName, int in_lineNumber)
지원이 필요하신가요?
질문이 있으신가요? 문제를 겪고 계신가요? 더 많은 정보가 필요하신가요? 저희에게 문의해주시면 도와드리겠습니다!
지원 페이지를 방문해 주세요
작업하는 프로젝트에 대해 알려주세요. 언제든지 도와드릴 준비가 되어 있습니다.
프로젝트를 등록하세요. 아무런 조건이나 의무 사항 없이 빠른 시작을 도와드리겠습니다.
Wwise를 시작해 보세요