CFx SDK Documentation  2020SP3
DbProxyObject.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2017, 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 Teigha(R) software pursuant to a license
16 // agreement with Open Design Alliance.
17 // Teigha(R) Copyright (C) 2002-2017 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 
26 
27 #ifndef OD_DBPROXY_H
28 #define OD_DBPROXY_H
29 
30 #include "TD_PackPush.h"
31 
32 #include "DbObject.h"
33 #include "IntArray.h"
34 
44 {
45 public:
47 
49 
51  OdDbDwgFiler* pFiler);
52 
53  virtual void dwgOutFields(
54  OdDbDwgFiler* pFiler) const;
55 
57  OdDbDxfFiler* pFiler);
58 
59  virtual void dxfOutFields(
60  OdDbDxfFiler* pFiler) const;
61 
62  virtual OdResult dxfIn(OdDbDxfFiler* filer);
63 
81  int proxyFlags() const;
82 
87 
92 
97 
104  OdTypedIdsArray& objectIds) const;
105 
107 
108  virtual OdDbObjectPtr subDeepClone(OdDbIdMapping& ownerIdMap, OdDbObject*, bool bPrimary) const ODRX_OVERRIDE;
109 
110  virtual OdDbObjectPtr subWblockClone(OdDbIdMapping& ownerIdMap, OdDbObject*, bool bPrimary) const ODRX_OVERRIDE;
111 
112  enum
113  {
114  kNoOperation = 0,
115  kEraseAllowed = 0x1,
116  kCloningAllowed = 0x80,
117  kAllButCloningAllowed = 0x1,
118  kAllAllowedBits = 0x81,
119  kMergeIgnore = 0,
120  kMergeReplace = 0x100,
121  kMergeMangleName = 0x200,
122  kDisableProxyWarning = 0x400
123  };
124 
128  bool eraseAllowed() const { return GETBIT(proxyFlags(), kEraseAllowed); }
132  bool allButCloningAllowed() const { return (proxyFlags() & kAllAllowedBits) == (kAllAllowedBits ^ kAllButCloningAllowed); }
133 
137  bool cloningAllowed() const { return GETBIT(proxyFlags(), kCloningAllowed); }
138 
150  bool allOperationsAllowed() const { return (proxyFlags() & kAllAllowedBits) == kAllAllowedBits; }
151 
155  bool isR13FormatProxy() const { return GETBIT(proxyFlags(), 32768); }
156 
158  bool erasing);
159 };
160 
165 
166 #include "TD_PackPop.h"
167 
168 #endif // OD_DBPROXY_H
169 
GETBIT
#define GETBIT(flags, bit)
Definition: OdaDefs.h:498
OdResult
OdResult
Definition: OdResult.h:29
OdDbProxyObject
Definition: DbProxyObject.h:44
OdString
Definition: OdString.h:95
OdDbProxyObject::allButCloningAllowed
bool allButCloningAllowed() const
Definition: DbProxyObject.h:132
OdDbProxyObject::subErase
virtual OdResult subErase(bool erasing)
DbObject.h
OdDbProxyObject::isR13FormatProxy
bool isR13FormatProxy() const
Definition: DbProxyObject.h:155
OdDbProxyObject::allOperationsAllowed
bool allOperationsAllowed() const
Definition: DbProxyObject.h:150
OdArray
Definition: OdArray.h:591
TD_PackPop.h
IntArray.h
OdDbProxyObject::dwgInFields
virtual OdResult dwgInFields(OdDbDwgFiler *pFiler)
OdDbProxyObject::dxfIn
virtual OdResult dxfIn(OdDbDxfFiler *filer)
OdDbProxyObjectPtr
OdSmartPtr< OdDbProxyObject > OdDbProxyObjectPtr
Definition: DbProxyObject.h:164
OdDbProxyObject::subDeepClone
virtual OdDbObjectPtr subDeepClone(OdDbIdMapping &ownerIdMap, OdDbObject *, bool bPrimary) const ODRX_OVERRIDE
OdDbProxyObject::getReferences
void getReferences(OdTypedIdsArray &objectIds) const
OdSmartPtr< OdDbObject >
OdDbProxyObject::dxfInFields
virtual OdResult dxfInFields(OdDbDxfFiler *pFiler)
OdDbProxyObject::proxyFlags
int proxyFlags() const
OdDbProxyObject::dwgOutFields
virtual void dwgOutFields(OdDbDwgFiler *pFiler) const
OdDbProxyObject::cloningAllowed
bool cloningAllowed() const
Definition: DbProxyObject.h:137
OdDbProxyObject::originalClassName
OdString originalClassName() const
OdDbDxfFiler
Definition: DbFiler.h:194
OdDbProxyObject::mergeStyle
OdDb::DuplicateRecordCloning mergeStyle() const
TD_PackPush.h
OdDbProxyObject::applicationDescription
OdString applicationDescription() const
OdDbProxyObject::ODDB_DECLARE_MEMBERS
ODDB_DECLARE_MEMBERS(OdDbProxyObject)
OdDbProxyObject::subWblockClone
virtual OdDbObjectPtr subWblockClone(OdDbIdMapping &ownerIdMap, OdDbObject *, bool bPrimary) const ODRX_OVERRIDE
TOOLKIT_EXPORT
#define TOOLKIT_EXPORT
Definition: DbExport.h:40
ODRX_OVERRIDE
#define ODRX_OVERRIDE
Definition: OdPlatformSettings.h:114
OdDbProxyObject::originalDxfName
OdString originalDxfName() const
OdDbProxyObject::dxfOutFields
virtual void dxfOutFields(OdDbDxfFiler *pFiler) const
OdDb::DuplicateRecordCloning
DuplicateRecordCloning
Definition: DbObject.h:126
OdDbProxyObject::eraseAllowed
bool eraseAllowed() const
Definition: DbProxyObject.h:128
OdDbProxyObject::OdDbProxyObject
OdDbProxyObject()
OdDbIdMapping
Definition: DbIdMapping.h:238
OdDbObject
Definition: DbObject.h:211
OdDbDwgFiler
Definition: DbFiler.h:1031