CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
FMGeometryDebug.h
Go to the documentation of this file.
1
2// Copyright (C) 2002-2022, 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-2022 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#ifdef _MSC_VER
64 #pragma warning( disable : 4127 )
65#endif // _MSC_VER
66
67#define FMGE_ASSERT( x ) \
68 { \
69 static bool bIgn = false; \
70 \
71 if ( ! (x) ) \
72 { \
73 FMGeAssert( \
74 OD_T(__FILE__), \
75 __LINE__, \
76 OD_T(#x), \
77 0, \
78 &bIgn \
79 ); \
80 } \
81 }
82
83#define FMGE_ASSERTMSG( x, c ) \
84 { \
85 static bool bIgn = false; \
86 \
87 if ( ! (x) ) \
88 { \
89 FMGeAssert( \
90 OD_T(__FILE__), \
91 __LINE__, \
92 OD_T(#x), \
93 OdString(c), \
94 &bIgn \
95 ); \
96 } \
97 }
98
99#define FMGE_VERIFY( x ) \
100 FMGE_ASSERT( x )
101
102#define FMGE_VERIFYMSG( x, c ) \
103 FMGE_ASSERTMSG( x, c )
104
105#define FMGE_FAULT( c ) \
106 { \
107 static bool bIgn = false; \
108 \
109 FMGeAssert( \
110 OD_T(__FILE__), \
111 __LINE__, \
112 0, \
113 OdString(c), \
114 &bIgn \
115 ); \
116 }
117
118#define FMGE_MUSTNOTEXECUTE \
119 FMGE_FAULT( OD_T("Must not execute!") )
120
121#define FMGE_TRACE( x ) \
122 (FMGeTrace x)
123
124#else //FMGE_DEBUG
125 #define FMGE_ASSERT(x) ((void)0)
126 #define FMGE_ASSERTMSG(x,c) ((void)0)
127 #define FMGE_VERIFY(x) (x)
128 #define FMGE_VERIFYMSG(x, c)(x)
129 #define FMGE_FAULT(c) ((void)0)
130 #define FMGE_MUSTNOTEXECUTE ((void)0)
131 #define FMGE_TRACE(x) ((void)0)
132#endif //FMGE_DEBUG
133
134#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)