Harlequin RIP SDK
Harlequin standard "assert" and "trace" macros

Files

file  hqassert.h
 Harlequin standard "assert" and "trace" macros.
 
file  hqcstass.h
 "Custom" Assert and Trace functions (called from HqAssert and HqTrace). Each platform should define its own version of these functions.
 

Macros

#define HQASSERT(fCondition, pszMessage)   EMPTY_STATEMENT()
 
#define HQASSERTV(fCondition, printf_style_args)   EMPTY_STATEMENT()
 
#define HQFAIL(pszMessage)   EMPTY_STATEMENT()
 
#define HQFAILV(printf_style_args)   EMPTY_STATEMENT()
 
#define HQASSERT_EXPR(fCondition, pszMessage, value)   ( value )
 
#define HQTRACE_ALWAYS(printf_style_args)   EMPTY_STATEMENT()
 
#define HQTRACE(fCondition, printf_style_args)   EMPTY_STATEMENT()
 
#define HQASSERT_FPEXCEP(pszMessage)   EMPTY_STATEMENT()
 
#define HQASSERT_PTR(pPtr)   EMPTY_STATEMENT()
 
#define HQASSERT_WPTR(pPtr)   EMPTY_STATEMENT()
 
#define HQASSERT_LPTR(pPtr)   EMPTY_STATEMENT()
 
#define HQASSERT_DPTR(pPtr)   EMPTY_STATEMENT()
 
#define ASSERT_BUILD_ONLY(stmt_)   EMPTY_STATEMENT()
 

Detailed Description

Macro Definition Documentation

◆ ASSERT_BUILD_ONLY

#define ASSERT_BUILD_ONLY (   stmt_)    EMPTY_STATEMENT()

Conditional compilation for assert builds.

Include stmt_ in assert builds. This macro is used when it is necessary to include assert-build specific statements in macro definitions.

This is compiled in assert builds only.

◆ HQASSERT

#define HQASSERT (   fCondition,
  pszMessage 
)    EMPTY_STATEMENT()

If fCondition is FALSE, issue pszMessage through a dialog or debug message channel, and perform a debug break. The message is augmented with the file and line number of the location generating the assert; the assert will only be reported once for each location.

This is compiled in assert builds only.

◆ HQASSERT_DPTR

#define HQASSERT_DPTR (   pPtr)    EMPTY_STATEMENT()

Variant of HQASSERT() to check validity of 64-bit pointers.

If pPtr is NULL or an invalid double long word (64-bit) pointer, issue a message through a dialog or debug message channel, and perform a debug break. The message is augmented with the file and line number of the location generating the assert; the assert will only be reported once for each location.

This is compiled in assert builds only.

◆ HQASSERT_EXPR

#define HQASSERT_EXPR (   fCondition,
  pszMessage,
  value 
)    ( value )

Variant of HQASSERT() that can be used in expressions.

If fCondition is FALSE, issue pszMessage through a dialog or debug message channel, and perform a debug break, then return value. The message is augmented with the file and line number of the location generating the assert; the assert will only be reported once for each location.

This is compiled in assert builds only.

◆ HQASSERT_FPEXCEP

#define HQASSERT_FPEXCEP (   pszMessage)    EMPTY_STATEMENT()

Variant of HQASSERT() to handle floating point exceptions.

If there is an unhandled floating point exception, issue pszMessage through a dialog or debug message channel, and perform a debug break. The message is augmented with the file and line number of the location generating the assert; the assert will only be reported once for each location.

This is compiled in assert builds only.

◆ HQASSERT_LPTR

#define HQASSERT_LPTR (   pPtr)    EMPTY_STATEMENT()

Variant of HQASSERT() to check validity of 32-bit pointers.

If pPtr is NULL or an invalid long word (32-bit) pointer, issue a message through a dialog or debug message channel, and perform a debug break. The message is augmented with the file and line number of the location generating the assert; the assert will only be reported once for each location.

This is compiled in assert builds only.

◆ HQASSERT_PTR

#define HQASSERT_PTR (   pPtr)    EMPTY_STATEMENT()

Variant of HQASSERT() to check validity of character pointers.

If pPtr is NULL, issue a message through a dialog or debug message channel, and perform a debug break. The message is augmented with the file and line number of the location generating the assert; the assert will only be reported once for each location.

This is compiled in assert builds only.

◆ HQASSERT_WPTR

#define HQASSERT_WPTR (   pPtr)    EMPTY_STATEMENT()

Variant of HQASSERT() to check validity of 16-bit pointers.

If pPtr is NULL or an invalid word (16-bit) pointer, issue a message through a dialog or debug message channel, and perform a debug break. The message is augmented with the file and line number of the location generating the assert; the assert will only be reported once for each location.

This is compiled in assert builds only.

◆ HQASSERTV

#define HQASSERTV (   fCondition,
  printf_style_args 
)    EMPTY_STATEMENT()

If fCondition is FALSE, construct a message from the format and variable arguments in printf_style_args, issue it through a dialog or debug message channel, and perform a debug break. The message is augmented with the file and line number of the location generating the assert; the assert will only be reported once for each location. Note that printf_style_args is an entire format and argument list surrounded by parentheses.

This is compiled in assert builds only.

Variant of HQASSERTV() that can be used in expressions.

If fCondition is FALSE, construct a message from the format and variable arguments in printf_style_args, issue it through a dialog or debug message channel, and perform a debug break, then return value. The message is augmented with the file and line number of the location generating the assert; the assert will only be reported once for each location. Note that printf_style_args is an entire format and argument list surrounded by parentheses.

This is compiled in assert builds only.

◆ HQFAIL

#define HQFAIL (   pszMessage)    EMPTY_STATEMENT()

Issue pszMessage through a dialog or debug message channel, and perform a debug break. The message is augmented with the file and line number of the location generating the assert; the assert will only be reported once for each location.

This is compiled in assert builds only.

◆ HQFAILV

#define HQFAILV (   printf_style_args)    EMPTY_STATEMENT()

Construct a message from the format and variable arguments in printf_style_args, issue it through a dialog or debug message channel, and perform a debug break. The message is augmented with the file and line number of the location generating the assert; the assert will only be reported once for each location. Note that printf_style_args is an entire format and argument list surrounded by parentheses.

This is compiled in assert builds only.

◆ HQTRACE

#define HQTRACE (   fCondition,
  printf_style_args 
)    EMPTY_STATEMENT()

If fCondition is TRUE, construct a message from the format and variable arguments in printf_style_args, issue it through a dialog or debug message channel, continuing without error. The message is augmented with the file and line number of the location generating the trace. Note that printf_style_args is an entire format and argument list surrounded by parentheses.

This is compiled in assert builds only.

◆ HQTRACE_ALWAYS

#define HQTRACE_ALWAYS (   printf_style_args)    EMPTY_STATEMENT()

Construct a message from the format and variable arguments in printf_style_args, issue it through a dialog or debug message channel, continuing without error. The message is augmented with the file and line number of the location generating the trace. Note that printf_style_args is an entire format and argument list surrounded by parentheses.

This is compiled in assert builds only.