CFx SDK Documentation  2020SP3
Macros | Functions
DebugStuff.h File Reference
#include "OdaDefs.h"
#include "RootExport.h"
#include <complex>

Go to the source code of this file.

Macros

#define ODA_DIAGNOSTICS
 
#define ODA_ASSERT(exp)   ((!(exp)) ? OdAssert(#exp, __FILE__, __LINE__) : oda_noop())
 
#define ODA_VERIFY(exp)   ODA_ASSERT(exp)
 
#define ODA_ASSERT_ONCE(exp)
 
#define ODA_VERIFY_ONCE(exp)
 
#define ODA_FAIL()   OdAssert("Invalid Execution.", __FILE__, __LINE__)
 
#define ODA_FAIL_ONCE()
 
#define ODA_FAIL_M(message)   (void)( (OdAssert(message, __FILE__, __LINE__), 0) )
 
#define ODA_FAIL_M_ONCE(message)
 
#define ODA_ASSERT_X(grp, exp)   (void)( (exp) || (OdAssert((const char*)#grp, (const char*)#exp, __FILE__, __LINE__), 0) )
 
#define ODA_VERIFY_X(grp, exp)   ODA_ASSERT_X(grp, exp)
 
#define ODA_ASSERT_ONCE_X(grp, exp)
 
#define ODA_FAIL_X(grp)   OdAssert(#grp, "Invalid Execution.", __FILE__, __LINE__)
 
#define ODA_FAIL_ONCE_X(grp)
 
#define ODA_ASSERT_VAR(code)   code
 
#define ToOdInt8   (val) (ODA_ASSERT(( (OdInt8)val) == val), (OdInt8) val)
 
#define ToOdUInt8   (val) (ODA_ASSERT(( (OdUInt8)val) == val), (OdUInt8) val)
 
#define ToOdInt16   (val) (ODA_ASSERT((( OdInt16)val) == val), (OdInt16) val)
 
#define ToOdUInt16(val)   (ODA_ASSERT(((OdUInt16)val) == val), (OdUInt16)val)
 
#define ToOdInt32   (val) (ODA_ASSERT(( (OdInt32)val) == val), (OdInt32) val)
 
#define ToOdUInt32(val)   (ODA_ASSERT(((OdUInt32)val) == val), (OdUInt32)val)
 
#define ODA_TRACE   OdTrace
 
#define ODA_TRACE0(szFormat)   OdTrace(OD_T(szFormat))
 
#define ODA_TRACE1(szFormat, param1)   OdTrace(OD_T(szFormat), param1)
 
#define ODA_TRACE2(szFormat, param1, param2)   OdTrace(OD_T(szFormat), param1, param2)
 
#define ODA_TRACE3(szFormat, param1, param2, param3)   OdTrace(OD_T(szFormat), param1, param2, param3)
 
#define ODA_ASSUME(expr)   extern char OdaAssumeArray[expr];
 
#define MARKMESSAGE(desc)
 
#define OD_ATAN2(y, x)   (atan2(y,x))
 
#define OD_ASIN(a)   asin(a)
 
#define OD_ACOS(a)   acos(a)
 
#define OD_WARNING_PUSH
 
#define OD_WARNING_DISABLE(number)
 
#define OD_WARNING_POP
 
#define OD_WARNING_SUPPRESS(number)
 

Functions

void FIRSTDLL_EXPORT OdAssert (const char *expresssion, const char *filename, int nLineNo)
 
void FIRSTDLL_EXPORT OdAssert (const char *group, const char *expresssion, const char *fileName, int nLineNo)
 
void FIRSTDLL_EXPORT OdTrace (const OdChar *szFormat,...)
 
void oda_noop (void)
 

Macro Definition Documentation

◆ MARKMESSAGE

#define MARKMESSAGE (   desc)

Definition at line 218 of file DebugStuff.h.

◆ OD_ACOS

#define OD_ACOS (   a)    acos(a)

Definition at line 270 of file DebugStuff.h.

◆ OD_ASIN

#define OD_ASIN (   a)    asin(a)

Definition at line 269 of file DebugStuff.h.

◆ OD_ATAN2

#define OD_ATAN2 (   y,
  x 
)    (atan2(y,x))

Definition at line 258 of file DebugStuff.h.

◆ OD_WARNING_DISABLE

#define OD_WARNING_DISABLE (   number)

Definition at line 286 of file DebugStuff.h.

◆ OD_WARNING_POP

#define OD_WARNING_POP

Definition at line 287 of file DebugStuff.h.

◆ OD_WARNING_PUSH

#define OD_WARNING_PUSH

Definition at line 285 of file DebugStuff.h.

◆ OD_WARNING_SUPPRESS

#define OD_WARNING_SUPPRESS (   number)

Definition at line 288 of file DebugStuff.h.

◆ ODA_ASSERT

#define ODA_ASSERT (   exp)    ((!(exp)) ? OdAssert(#exp, __FILE__, __LINE__) : oda_noop())

Definition at line 49 of file DebugStuff.h.

◆ ODA_ASSERT_ONCE

#define ODA_ASSERT_ONCE (   exp)
Value:
{ static bool was_here = false;\
if (!was_here && !(exp))\
{ was_here = true;\
OdAssert(#exp, __FILE__, __LINE__);\
}\
}

Definition at line 51 of file DebugStuff.h.

◆ ODA_ASSERT_ONCE_X

#define ODA_ASSERT_ONCE_X (   grp,
  exp 
)
Value:
{ static bool was_here = false;\
if (!was_here && !(exp))\
{ was_here = true;\
OdAssert(#grp, #exp, __FILE__, __LINE__);\
}\
}

Definition at line 86 of file DebugStuff.h.

◆ ODA_ASSERT_VAR

#define ODA_ASSERT_VAR (   code)    code

Definition at line 101 of file DebugStuff.h.

◆ ODA_ASSERT_X

#define ODA_ASSERT_X (   grp,
  exp 
)    (void)( (exp) || (OdAssert((const char*)#grp, (const char*)#exp, __FILE__, __LINE__), 0) )

Definition at line 84 of file DebugStuff.h.

◆ ODA_ASSUME

#define ODA_ASSUME (   expr)    extern char OdaAssumeArray[expr];

Definition at line 157 of file DebugStuff.h.

◆ ODA_DIAGNOSTICS

#define ODA_DIAGNOSTICS

Definition at line 32 of file DebugStuff.h.

◆ ODA_FAIL

#define ODA_FAIL ( )    OdAssert("Invalid Execution.", __FILE__, __LINE__)

Definition at line 65 of file DebugStuff.h.

◆ ODA_FAIL_M

#define ODA_FAIL_M (   message)    (void)( (OdAssert(message, __FILE__, __LINE__), 0) )

Definition at line 74 of file DebugStuff.h.

◆ ODA_FAIL_M_ONCE

#define ODA_FAIL_M_ONCE (   message)
Value:
{ static bool was_here = false;\
if (!was_here)\
{ was_here = true;\
OdAssert(message, __FILE__, __LINE__);\
}\
}

Definition at line 75 of file DebugStuff.h.

◆ ODA_FAIL_ONCE

#define ODA_FAIL_ONCE ( )
Value:
{ static bool was_here = false;\
if (!was_here)\
{ was_here = true;\
OdAssert("Invalid Execution.", __FILE__, __LINE__);\
}\
}

Definition at line 66 of file DebugStuff.h.

◆ ODA_FAIL_ONCE_X

#define ODA_FAIL_ONCE_X (   grp)
Value:
{ static bool was_here = false;\
if (!was_here)\
{ was_here = true;\
OdAssert(#grp, "Invalid Execution.", __FILE__, __LINE__);\
}\
}

Definition at line 94 of file DebugStuff.h.

◆ ODA_FAIL_X

#define ODA_FAIL_X (   grp)    OdAssert(#grp, "Invalid Execution.", __FILE__, __LINE__)

Definition at line 93 of file DebugStuff.h.

◆ ODA_TRACE

#define ODA_TRACE   OdTrace

Definition at line 139 of file DebugStuff.h.

◆ ODA_TRACE0

#define ODA_TRACE0 (   szFormat)    OdTrace(OD_T(szFormat))

Definition at line 140 of file DebugStuff.h.

◆ ODA_TRACE1

#define ODA_TRACE1 (   szFormat,
  param1 
)    OdTrace(OD_T(szFormat), param1)

Definition at line 141 of file DebugStuff.h.

◆ ODA_TRACE2

#define ODA_TRACE2 (   szFormat,
  param1,
  param2 
)    OdTrace(OD_T(szFormat), param1, param2)

Definition at line 142 of file DebugStuff.h.

◆ ODA_TRACE3

#define ODA_TRACE3 (   szFormat,
  param1,
  param2,
  param3 
)    OdTrace(OD_T(szFormat), param1, param2, param3)

Definition at line 143 of file DebugStuff.h.

◆ ODA_VERIFY

#define ODA_VERIFY (   exp)    ODA_ASSERT(exp)

Definition at line 50 of file DebugStuff.h.

◆ ODA_VERIFY_ONCE

#define ODA_VERIFY_ONCE (   exp)
Value:
{ static bool was_here = false;\
if (!(exp) && !was_here)\
{ was_here = true;\
OdAssert(#exp, __FILE__, __LINE__);\
}\
}

Definition at line 58 of file DebugStuff.h.

◆ ODA_VERIFY_X

#define ODA_VERIFY_X (   grp,
  exp 
)    ODA_ASSERT_X(grp, exp)

Definition at line 85 of file DebugStuff.h.

◆ ToOdInt16

#define ToOdInt16   (val) (ODA_ASSERT((( OdInt16)val) == val), (OdInt16) val)

Definition at line 104 of file DebugStuff.h.

◆ ToOdInt32

#define ToOdInt32   (val) (ODA_ASSERT(( (OdInt32)val) == val), (OdInt32) val)

Definition at line 106 of file DebugStuff.h.

◆ ToOdInt8

#define ToOdInt8   (val) (ODA_ASSERT(( (OdInt8)val) == val), (OdInt8) val)

Definition at line 102 of file DebugStuff.h.

◆ ToOdUInt16

#define ToOdUInt16 (   val)    (ODA_ASSERT(((OdUInt16)val) == val), (OdUInt16)val)

Definition at line 105 of file DebugStuff.h.

◆ ToOdUInt32

#define ToOdUInt32 (   val)    (ODA_ASSERT(((OdUInt32)val) == val), (OdUInt32)val)

Definition at line 107 of file DebugStuff.h.

◆ ToOdUInt8

#define ToOdUInt8   (val) (ODA_ASSERT(( (OdUInt8)val) == val), (OdUInt8) val)

Definition at line 103 of file DebugStuff.h.

Function Documentation

◆ oda_noop()

void oda_noop ( void  )
inline

Definition at line 48 of file DebugStuff.h.

◆ OdAssert() [1/2]

void FIRSTDLL_EXPORT OdAssert ( const char *  expresssion,
const char *  filename,
int  nLineNo 
)

◆ OdAssert() [2/2]

void FIRSTDLL_EXPORT OdAssert ( const char *  group,
const char *  expresssion,
const char *  fileName,
int  nLineNo 
)

◆ OdTrace()

void FIRSTDLL_EXPORT OdTrace ( const OdChar szFormat,
  ... 
)