Dataflow Runtime API  3.1.1.0
Classes | Macros | Functions
Diagnostics.h File Reference
#include <Imt.Base.Core.Platform/Platform.h>
#include "AssertActionManager.h"
#include "DiagnosticsConfigApp.h"

Classes

struct  STATIC_ASSERTION_FAILURE< true >
 Partial specialization of STATIC_ASSERTION_FAILURE only for true. More...
 
struct  STATIC_ASSERT_TEST< int32_t >
 Interface static_assert_test. More...
 

Macros

#define ASSERT_JOIN(X, Y)   DO_ASSERT_JOIN(X, Y)
 
#define DO_ASSERT_JOIN(X, Y)   X##Y
 
#define ASSERT_COMPILER(B)
 

Functions

void ASSERT_EX1 (const bool condition, const char_t *const pMessage)
 "Assert and throw exception" (ASSERT_EX). More...
 
void ASSERT_EX (const bool condition)
 
void ASSERT_DEBUG1 (const bool condition, const char_t *const pMessage)
 "Assert for debugging only" (ASSERT_DEBUG). More...
 
void ASSERT_DEBUG (const bool condition)
 

Macro Definition Documentation

◆ ASSERT_COMPILER

#define ASSERT_COMPILER (   B)
Value:
/*lint -esym(749,*STATIC_ASSERT_TEST*)*/ \
/*lint -esym(753,*untagged*)*/ \
/*lint -esym(758,*untagged*)*/ \
enum { \
ASSERT_JOIN(STATIC_ASSERT_TEST, __LINE__) = sizeof( STATIC_ASSERTION_FAILURE< ( B ) > ) \
} \
Interface static_assert_test.
Definition: Diagnostics.h:123
Check at compile time if a condition is true.
Definition: Diagnostics.h:111

◆ ASSERT_JOIN

#define ASSERT_JOIN (   X,
 
)    DO_ASSERT_JOIN(X, Y)

◆ DO_ASSERT_JOIN

#define DO_ASSERT_JOIN (   X,
 
)    X##Y

Function Documentation

◆ ASSERT_DEBUG()

void ASSERT_DEBUG ( const bool  condition)
inline
See also
ASSERT_DEBUG1

◆ ASSERT_DEBUG1()

void ASSERT_DEBUG1 ( const bool  condition,
const char_t *const  pMessage 
)
inline

"Assert for debugging only" (ASSERT_DEBUG).

Use this sort of assertion only while debugging. This flavor of asserts will be compiled only for a debug build on the the developer machine and on the target as well.

Parameters
conditionWhen this condition evaluates to false the handler will be called
pMessageThe message to specify the error that has occurred

◆ ASSERT_EX()

void ASSERT_EX ( const bool  condition)
inline
See also
ASSERT_EX1

◆ ASSERT_EX1()

void ASSERT_EX1 ( const bool  condition,
const char_t *const  pMessage 
)
inline

"Assert and throw exception" (ASSERT_EX).

Even so we do not have exception support use this macro to test conditions for which it is not secure to continue safely when the condition evaluates to false. The registered handler is responsible to react appropriately. There is a second version of this macro with a postfix of 1. It takes additionally a second parameter. This parameter is for future extensions in the debugging environment. It takes a c-string which will be used to indicate the reason of the failure.

Parameters
conditionWhen this condition evaluates to false the handler will be called
pMessageThe message to specify the error that has occurred