CFx SDK Documentation 2026 SP0
Loading...
Searching...
No Matches
FMGeometryDebug.h
Go to the documentation of this file.
1
2// Copyright (C) 2002-2024, Open Design Alliance (the "Alliance").
3// All rights reserved.
4//
5// This software and its documentation and related materials are owned by
6// the Alliance. The software may only be incorporated into application
7// programs owned by members of the Alliance, subject to a signed
8// Membership Agreement and Supplemental Software License Agreement with the
9// Alliance. The structure and organization of this software are the valuable
10// trade secrets of the Alliance and its suppliers. The software is also
11// protected by copyright law and international treaty provisions. Application
12// programs incorporating this software must include the following statement
13// with their copyright notices:
14//
15// This application incorporates Open Design Alliance software pursuant to a license
16// agreement with Open Design Alliance.
17// Open Design Alliance Copyright (C) 2002-2024 by Open Design Alliance.
18// All rights reserved.
19//
20// By use of this software, its documentation or related materials, you
21// acknowledge and accept the above terms.
23#ifndef __FMGEOMETRYDEBUG_H__
24#define __FMGEOMETRYDEBUG_H__
25
26#include "FMBuildSettings.h"
27#include <OdaCommon.h>
28
30 const OdChar* strFile,
31 int iLine,
32 const OdChar* strExpr,
33 const OdChar* strComment,
34 bool* pIgnoreThis
35 );
36
38 const OdChar* strExpr
39 );
40
43
45 const OdChar* strFile,
46 int iLine,
47 const OdChar* strExpr,
48 const OdChar* strComment,
49 bool* pIgnoreThis
50);
51
52void FMGEOMETRY_API FMGeTrace( const OdChar* strFormat, ... );
53
54
55#ifndef FMGE_DEBUG
56 #ifdef _DEBUG
57 #define FMGE_DEBUG
58 #endif
59#endif
60
61#ifdef FMGE_DEBUG
62
63#define FMGE_ASSERT( x ) \
64 { \
65 static bool bIgn = false; \
66 \
67 if ( ! (x) ) \
68 { \
69 FMGeAssert( \
70 OD_T(__FILE__), \
71 __LINE__, \
72 OD_T(#x), \
73 0, \
74 &bIgn \
75 ); \
76 } \
77 }
78
79#define FMGE_ASSERTMSG( x, c ) \
80 { \
81 static bool bIgn = false; \
82 \
83 if ( ! (x) ) \
84 { \
85 FMGeAssert( \
86 OD_T(__FILE__), \
87 __LINE__, \
88 OD_T(#x), \
89 OdString(c), \
90 &bIgn \
91 ); \
92 } \
93 }
94
95#define FMGE_VERIFY( x ) \
96 FMGE_ASSERT( x )
97
98#define FMGE_VERIFYMSG( x, c ) \
99 FMGE_ASSERTMSG( x, c )
100
101#define FMGE_FAULT( c ) \
102 { \
103 static bool bIgn = false; \
104 \
105 FMGeAssert( \
106 OD_T(__FILE__), \
107 __LINE__, \
108 0, \
109 OdString(c), \
110 &bIgn \
111 ); \
112 }
113
114#define FMGE_MUSTNOTEXECUTE \
115 FMGE_FAULT( OD_T("Must not execute!") )
116
117#define FMGE_TRACE( x ) \
118 (FMGeTrace x)
119
120#else //FMGE_DEBUG
121 #define FMGE_ASSERT(x) ((void)0)
122 #define FMGE_ASSERTMSG(x,c) ((void)0)
123 #define FMGE_VERIFY(x) (x)
124 #define FMGE_VERIFYMSG(x, c)(x)
125 #define FMGE_FAULT(c) ((void)0)
126 #define FMGE_MUSTNOTEXECUTE ((void)0)
127 #define FMGE_TRACE(x) ((void)0)
128#endif //FMGE_DEBUG
129
130#endif //__FMGEOMETRYDEBUG_H__
#define FMGEOMETRY_API
void FMGEOMETRY_API FMGeTrace(const OdChar *strFormat,...)
void(* FMGeAssertFuncPtr)(const OdChar *strFile, int iLine, const OdChar *strExpr, const OdChar *strComment, bool *pIgnoreThis)
FMGeAssertFuncPtr FMGEOMETRY_API FMGeSetAssertFunc(FMGeAssertFuncPtr ptrAssert)
void(* FMGeTraceFuncPtr)(const OdChar *strExpr)
FMGeTraceFuncPtr FMGEOMETRY_API FMGeSetTraceFunc(FMGeTraceFuncPtr ptrTrace)
void FMGEOMETRY_API FMGeAssert(const OdChar *strFile, int iLine, const OdChar *strExpr, const OdChar *strComment, bool *pIgnoreThis)
wchar_t OdChar
typedef void(APIENTRYP PFNGLACTIVETEXTUREPROC)(GLenum texture)