CFx SDK Documentation  2022 SP0
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 
#define TOOLKIT_EXPORT
Definition: DbExport.h:40
OdSmartPtr< OdDbProxyObject > OdDbProxyObjectPtr
#define ODRX_OVERRIDE
OdResult
Definition: OdResult.h:29
#define GETBIT(flags, bit)
Definition: OdaDefs.h:498
bool eraseAllowed() const
void getReferences(OdTypedIdsArray &objectIds) const
bool isR13FormatProxy() const
bool allButCloningAllowed() const
virtual OdResult dxfIn(OdDbDxfFiler *filer)
virtual void dxfOutFields(OdDbDxfFiler *pFiler) const
virtual OdDbObjectPtr subDeepClone(OdDbIdMapping &ownerIdMap, OdDbObject *, bool bPrimary) const ODRX_OVERRIDE
bool cloningAllowed() const
OdString applicationDescription() const
virtual OdResult subErase(bool erasing)
virtual OdDbObjectPtr subWblockClone(OdDbIdMapping &ownerIdMap, OdDbObject *, bool bPrimary) const ODRX_OVERRIDE
OdDb::DuplicateRecordCloning mergeStyle() const
OdString originalDxfName() const
virtual void dwgOutFields(OdDbDwgFiler *pFiler) const
int proxyFlags() const
OdString originalClassName() const
virtual OdResult dxfInFields(OdDbDxfFiler *pFiler)
ODDB_DECLARE_MEMBERS(OdDbProxyObject)
bool allOperationsAllowed() const
virtual OdResult dwgInFields(OdDbDwgFiler *pFiler)
DuplicateRecordCloning
Definition: DbObject.h:126