7 #define FW_ASSERT_FIRST_ARG(ARG_0, ...) ARG_0 9 #define FW_ASSERT_NO_FIRST_ARG(ARG_0, ...) __VA_ARGS__ 11 #if FW_ASSERT_LEVEL == FW_NO_ASSERT 14 #define FW_ASSERT(...) ((void)(FW_ASSERT_FIRST_ARG(__VA_ARGS__))) 16 #define FILE_NAME_ARG const CHAR* 17 #else // ASSERT is defined 21 #if FW_ASSERT_LEVEL == FW_FILEID_ASSERT 22 #define FILE_NAME_ARG U32 23 #define FW_ASSERT(...) \ 24 ((void)((FW_ASSERT_FIRST_ARG(__VA_ARGS__, 0)) \ 26 : (Fw::SwAssert(ASSERT_FILE_ID, FW_ASSERT_NO_FIRST_ARG(__VA_ARGS__, __LINE__))))) 27 #elif FW_ASSERT_LEVEL == FW_RELATIVE_PATH_ASSERT 28 #define FILE_NAME_ARG const CHAR* 29 #define FW_ASSERT(...) \ 30 ((void)((FW_ASSERT_FIRST_ARG(__VA_ARGS__, 0)) \ 32 : (Fw::SwAssert(ASSERT_RELATIVE_PATH, FW_ASSERT_NO_FIRST_ARG(__VA_ARGS__, __LINE__))))) 34 #define FILE_NAME_ARG const CHAR* 35 #define FW_ASSERT(...) \ 36 ((void)((FW_ASSERT_FIRST_ARG(__VA_ARGS__, 0)) \ 38 : (Fw::SwAssert(__FILE__, FW_ASSERT_NO_FIRST_ARG(__VA_ARGS__, __LINE__))))) 40 #endif // if ASSERT is defined 45 #ifndef CLANG_ANALYZER_NORETURN 47 #define __has_feature(x) 0 // Compatibility with non-clang compilers. 49 #if __has_feature(attribute_analyzer_noreturn) 50 #define CLANG_ANALYZER_NORETURN __attribute__((analyzer_noreturn)) 52 #define CLANG_ANALYZER_NORETURN 140 #endif // FW_ASSERT_HPP PlatformUIntType NATIVE_UINT_TYPE
PlatformAssertArgType FwAssertArgType
PlatformIntType NATIVE_INT_TYPE
virtual void reportAssert(FILE_NAME_ARG file, NATIVE_UINT_TYPE lineNo, NATIVE_UINT_TYPE numArgs, FwAssertArgType arg1, FwAssertArgType arg2, FwAssertArgType arg3, FwAssertArgType arg4, FwAssertArgType arg5, FwAssertArgType arg6)
destructor
C++-compatible configuration header for fprime configuration.
virtual ~AssertHook()
constructor
#define CLANG_ANALYZER_NORETURN
NATIVE_INT_TYPE SwAssert(FILE_NAME_ARG file, NATIVE_UINT_TYPE lineNo)
Assert with no arguments.
virtual void printAssert(const CHAR *msg)