CFx SDK Documentation
2024 SP0
Loading...
Searching...
No Matches
SDK
CFx
dd_inc
DwgDeclareMembers.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
24
25
#ifndef _ODDBDWGCLASSDEF_H_INCLUDED_
26
#define _ODDBDWGCLASSDEF_H_INCLUDED_
27
28
29
30
TOOLKIT_EXPORT
OdRxClass
*
oddbDwgClassMapDesc
(
OdUInt16
nDwgType);
31
32
33
enum
{
34
# define __DUMMY_( a,b,c,d,e,f,g,h,i )
35
# define CLASSDEF(DWGTYPE,ClassName, BaseClassName,DwgVer,MaintVer,DxfName,AppName,ProxyFlags,CustomFlags)\
36
kDwgId_OdDb##ClassName = DWGTYPE,
37
# include "
DwgClassDef.h
"
38
# undef CLASSDEF
39
# undef CLASSmic
40
# undef CLASSdim
41
# undef CLASSext
42
# undef __DUMMY_
43
kOdDbDwgClassMapSize
,
44
kDwgId_OdDbProxyObject
=
kOdDbDwgClassMapSize
,
45
kDwgId_OdDbProxyEntity
,
46
kDwgId_OdDbVertex
,
47
kDwgId_OdDbDimension
,
48
kOdDbDwgClassMapSize_WithProxy
49
};
50
51
#define DWGMAP_DECLARE_MEMBERS(ClassName) \
52
protected: \
53
ClassName(OdDbObjectImpl* pImpl); \
54
public: \
55
\
56
\
57
static OdSmartPtr<ClassName> cast(const OdRxObject* pObj) { \
58
if (pObj) \
59
return OdSmartPtr<ClassName>(((ClassName*)pObj->queryX(ClassName::desc())), kOdRxObjAttach); \
60
return (ClassName*)0; \
61
} \
62
\
63
\
64
\
65
\
66
static OdRxClass* desc() { return ::oddbDwgClassMapDesc(kDwgId_##ClassName); } \
67
\
68
\
69
\
70
\
71
virtual OdRxClass* isA() const; \
72
\
73
\
74
\
75
virtual OdRxObject* queryX(const OdRxClass* protocolClass) const; \
76
\
77
\
78
\
79
static OdRxObjectPtr pseudoConstructor(); \
80
\
81
\
82
\
83
static OdSmartPtr<ClassName> createObject() \
84
{ if (desc()) return desc()->create(); throw OdError("OdDb"
#ClassName "is not loaded"); } \
85
\
86
\
87
static void rxInit(); \
88
static void rxInit(AppNameChangeFuncPtr appNameChangeFunc); \
89
\
90
/* Unregisters ClassName with the Drawings. **/
\
91
static void rxUninit()
92
93
94
95
96
#endif
// _ODDBDWGCLASSDEF_H_INCLUDED_
TOOLKIT_EXPORT
#define TOOLKIT_EXPORT
Definition:
DbExport.h:40
DwgClassDef.h
oddbDwgClassMapDesc
TOOLKIT_EXPORT OdRxClass * oddbDwgClassMapDesc(OdUInt16 nDwgType)
kDwgId_OdDbDimension
@ kDwgId_OdDbDimension
Definition:
DwgDeclareMembers.h:47
kDwgId_OdDbVertex
@ kDwgId_OdDbVertex
Definition:
DwgDeclareMembers.h:46
kDwgId_OdDbProxyEntity
@ kDwgId_OdDbProxyEntity
Definition:
DwgDeclareMembers.h:45
kOdDbDwgClassMapSize_WithProxy
@ kOdDbDwgClassMapSize_WithProxy
Definition:
DwgDeclareMembers.h:48
kDwgId_OdDbProxyObject
@ kDwgId_OdDbProxyObject
Definition:
DwgDeclareMembers.h:44
kOdDbDwgClassMapSize
@ kOdDbDwgClassMapSize
Definition:
DwgDeclareMembers.h:43
OdUInt16
unsigned short OdUInt16
Definition:
OdPlatformSettings.h:791
OdRxClass
Definition:
RxObject.h:860
Generated on Wed Apr 5 2023 17:29:14