CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
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 241 of file DebugStuff.h.

◆ OD_ACOS

#define OD_ACOS (   a)    acos(a)

Definition at line 293 of file DebugStuff.h.

◆ OD_ASIN

#define OD_ASIN (   a)    asin(a)

Definition at line 292 of file DebugStuff.h.

◆ OD_ATAN2

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

Definition at line 281 of file DebugStuff.h.

◆ OD_WARNING_DISABLE

#define OD_WARNING_DISABLE (   number)

Definition at line 309 of file DebugStuff.h.

◆ OD_WARNING_POP

#define OD_WARNING_POP

Definition at line 310 of file DebugStuff.h.

◆ OD_WARNING_PUSH

#define OD_WARNING_PUSH

Definition at line 308 of file DebugStuff.h.

◆ OD_WARNING_SUPPRESS

#define OD_WARNING_SUPPRESS (   number)

Definition at line 311 of file DebugStuff.h.

◆ ODA_ASSERT

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

Definition at line 57 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 73 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 109 of file DebugStuff.h.

◆ ODA_ASSERT_VAR

#define ODA_ASSERT_VAR (   code)    code

Definition at line 124 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 107 of file DebugStuff.h.

◆ ODA_ASSUME

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

Definition at line 180 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 88 of file DebugStuff.h.

◆ ODA_FAIL_M

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

Definition at line 97 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 98 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 89 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 117 of file DebugStuff.h.

◆ ODA_FAIL_X

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

Definition at line 116 of file DebugStuff.h.

◆ ODA_TRACE

#define ODA_TRACE   OdTrace

Definition at line 162 of file DebugStuff.h.

◆ ODA_TRACE0

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

Definition at line 163 of file DebugStuff.h.

◆ ODA_TRACE1

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

Definition at line 164 of file DebugStuff.h.

◆ ODA_TRACE2

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

Definition at line 165 of file DebugStuff.h.

◆ ODA_TRACE3

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

Definition at line 166 of file DebugStuff.h.

◆ ODA_VERIFY

#define ODA_VERIFY (   exp)    ODA_ASSERT(exp)

Definition at line 59 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 81 of file DebugStuff.h.

◆ ODA_VERIFY_X

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

Definition at line 108 of file DebugStuff.h.

◆ ToOdInt16

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

Definition at line 127 of file DebugStuff.h.

◆ ToOdInt32

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

Definition at line 129 of file DebugStuff.h.

◆ ToOdInt8

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

Definition at line 125 of file DebugStuff.h.

◆ ToOdUInt16

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

Definition at line 128 of file DebugStuff.h.

◆ ToOdUInt32

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

Definition at line 130 of file DebugStuff.h.

◆ ToOdUInt8

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

Definition at line 126 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,
  ... 
)