CFx SDK Documentation  2020SP3
DbProxyEntity.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_DB_PROXY_ENTITY_
28 #define _OD_DB_PROXY_ENTITY_
29 
30 #include "TD_PackPush.h"
31 
32 #include "DbEntity.h"
33 #include "IdArrays.h"
34 
53 {
54 public:
56 
58 
60  {
61  kNoMetafile = 0, // No bounding box or graphics (R13 drawing files only)
62  kBoundingBox = 1, // Bounding Box
63  kFullGraphics = 2 // Full Graphics
64  };
65 
80 
81  virtual OdDbObjectPtr subDeepClone(OdDbIdMapping& ownerIdMap, OdDbObject*, bool bPrimary) const ODRX_OVERRIDE;
82 
83  virtual OdDbObjectPtr subWblockClone(OdDbIdMapping& ownerIdMap, OdDbObject*, bool bPrimary) const ODRX_OVERRIDE;
84 
85  /* Replace OdRxObjectPtrArray */
86 
88  OdRxObjectPtrArray& entitySet) const ODRX_OVERRIDE;
89 
90  /*
91  virtual bool subGetGeomExtents(OdGeExtents3d& extents) const;
92  */
93 
94  enum
95  {
96  kNoOperation = 0x000,
97  kEraseAllowed = 0x001,
98  kTransformAllowed = 0x002,
99  kColorChangeAllowed = 0x004,
100  kLayerChangeAllowed = 0x008,
101  kLinetypeChangeAllowed = 0x010,
102  kLinetypeScaleChangeAllowed = 0x020,
103  kVisibilityChangeAllowed = 0x040,
104  kCloningAllowed = 0x080,
105  kLineWeightChangeAllowed = 0x100,
106  kPlotStyleNameChangeAllowed = 0x200,
107  kDisableProxyWarning = 0x400,
108  kMaterialChangeAllowed = 0x800,
109  kAllButCloningAllowed = 0xB7F,
110  kAllAllowedBits = 0xBFF
111  };
112 
140  virtual int proxyFlags() const;
141 
145  bool eraseAllowed() const { return GETBIT(proxyFlags(), kEraseAllowed); }
149  bool transformAllowed() const { return GETBIT(proxyFlags(), kTransformAllowed); }
153  bool colorChangeAllowed() const { return GETBIT(proxyFlags(), kColorChangeAllowed); }
157  bool layerChangeAllowed() const { return GETBIT(proxyFlags(), kLayerChangeAllowed); }
161  bool linetypeChangeAllowed() const { return GETBIT(proxyFlags(), kLinetypeChangeAllowed); }
165  bool linetypeScaleChangeAllowed() const { return GETBIT(proxyFlags(), kLinetypeScaleChangeAllowed); }
169  bool visibilityChangeAllowed() const { return GETBIT(proxyFlags(), kVisibilityChangeAllowed); }
173  bool lineWeightChangeAllowed() const { return GETBIT(proxyFlags(), kLineWeightChangeAllowed); }
177  bool plotStyleNameChangeAllowed() const { return GETBIT(proxyFlags(), kPlotStyleNameChangeAllowed); }
181  bool materialChangeAllowed() const { return GETBIT(proxyFlags(), kMaterialChangeAllowed); }
185  bool cloningAllowed() const { return GETBIT(proxyFlags(), kCloningAllowed); }
205  bool allButCloningAllowed() const { return (proxyFlags() & kAllAllowedBits) == (kAllAllowedBits ^ kAllButCloningAllowed); }
227  bool allOperationsAllowed() const { return (proxyFlags() & kAllAllowedBits) == kAllAllowedBits; }
228 
232  bool isR13FormatProxy() const { return GETBIT(proxyFlags(), 0x8000); }
233 
237  virtual OdString originalClassName() const;
238 
242  virtual OdString originalDxfName() const;
243 
248 
254  virtual void getReferences(
255  OdTypedIdsArray& objectIds) const;
256 
258  OdDbDwgFiler* pFiler);
259 
260  virtual void dwgOutFields(
261  OdDbDwgFiler* pFiler) const;
262 
264  OdDbDxfFiler* pFiler);
265 
266  virtual void dxfOutFields(
267  OdDbDxfFiler* pFiler) const;
268 
270  OdDbDxfFiler* pFiler);
271 
273  const OdGeMatrix3d& xfm) ODRX_OVERRIDE;
274 
283  const OdCmColor &color,
284  bool doSubents = true);
289  OdUInt16 colorIndex,
290  bool doSubents = true);
295  OdDbObjectId colorId,
296  bool doSubents = true);
301  const OdString& plotStyleName,
302  bool doSubents = true);
307  OdDb::PlotStyleNameType plotStyleNameType,
309  bool doSubents = true);
314  const OdString& layerName,
315  bool doSubents = true,
316  bool allowHiddenLayer = false);
321  OdDbObjectId layerId,
322  bool doSubents = true,
323  bool allowHiddenLayer = false);
328  const OdString& linetypeName,
329  bool doSubents = true);
334  OdDbObjectId linetypeID,
335  bool doSubents = true);
340  double linetypeScale,
341  bool doSubents = true);
346  OdDb::Visibility visibility,
347  bool doSubents = true);
352  OdDb::LineWeight lineWeight,
353  bool doSubents = true);
354 
359  const OdString& materialName,
360  bool doSubents = true);
362  OdDbObjectId materialID,
363  bool doSubents = true);
364 
366  bool erasing);
367 };
368 
373 
374 #include "TD_PackPop.h"
375 
376 #endif
GETBIT
#define GETBIT(flags, bit)
Definition: OdaDefs.h:498
OdDbProxyEntity::setLinetypeScale
virtual OdResult setLinetypeScale(double linetypeScale, bool doSubents=true)
OdResult
OdResult
Definition: OdResult.h:29
OdString
Definition: OdString.h:95
OdDbProxyEntity::setPlotStyleName
virtual OdResult setPlotStyleName(const OdString &plotStyleName, bool doSubents=true)
OdDbProxyEntity::colorChangeAllowed
bool colorChangeAllowed() const
Definition: DbProxyEntity.h:153
OdDbProxyEntity::dwgInFields
virtual OdResult dwgInFields(OdDbDwgFiler *pFiler)
OdDbProxyEntity::visibilityChangeAllowed
bool visibilityChangeAllowed() const
Definition: DbProxyEntity.h:169
IdArrays.h
OdDbProxyEntity::transformAllowed
bool transformAllowed() const
Definition: DbProxyEntity.h:149
OdDbProxyEntity::layerChangeAllowed
bool layerChangeAllowed() const
Definition: DbProxyEntity.h:157
OdDbProxyEntity::linetypeScaleChangeAllowed
bool linetypeScaleChangeAllowed() const
Definition: DbProxyEntity.h:165
OdDbProxyEntity::eraseAllowed
bool eraseAllowed() const
Definition: DbProxyEntity.h:145
OdDbProxyEntity::linetypeChangeAllowed
bool linetypeChangeAllowed() const
Definition: DbProxyEntity.h:161
OdDbProxyEntity::applicationDescription
virtual OdString applicationDescription() const
OdDbObjectId
Definition: DbObjectId.h:99
OdDbProxyEntity::subDeepClone
virtual OdDbObjectPtr subDeepClone(OdDbIdMapping &ownerIdMap, OdDbObject *, bool bPrimary) const ODRX_OVERRIDE
OdArray< OdRxObjectPtr >
TD_PackPop.h
OdUInt16
unsigned short OdUInt16
Definition: OdPlatformSettings.h:760
OdDbProxyEntity::materialChangeAllowed
bool materialChangeAllowed() const
Definition: DbProxyEntity.h:181
OdDbProxyEntity::setPlotStyleName
virtual OdResult setPlotStyleName(OdDb::PlotStyleNameType plotStyleNameType, OdDbObjectId newId=OdDbObjectId::kNull, bool doSubents=true)
OdGeMatrix3d
Definition: GeMatrix3d.h:73
OdDbProxyEntity
Definition: DbProxyEntity.h:53
OdDbProxyEntity::cloningAllowed
bool cloningAllowed() const
Definition: DbProxyEntity.h:185
OdDbProxyEntity::dxfOutFields
virtual void dxfOutFields(OdDbDxfFiler *pFiler) const
OdDbProxyEntity::setColor
virtual OdResult setColor(const OdCmColor &color, bool doSubents=true)
OdDbProxyEntity::dxfInFields
virtual OdResult dxfInFields(OdDbDxfFiler *pFiler)
OdDbProxyEntity::proxyFlags
virtual int proxyFlags() const
OdSmartPtr< OdDbObject >
OdDbProxyEntity::subSetVisibility
virtual OdResult subSetVisibility(OdDb::Visibility visibility, bool doSubents=true)
OdDbProxyEntity::originalClassName
virtual OdString originalClassName() const
DbEntity.h
OdDbProxyEntity::setLayer
virtual OdResult setLayer(OdDbObjectId layerId, bool doSubents=true, bool allowHiddenLayer=false)
OdDbProxyEntity::isR13FormatProxy
bool isR13FormatProxy() const
Definition: DbProxyEntity.h:232
OdDbProxyEntity::getReferences
virtual void getReferences(OdTypedIdsArray &objectIds) const
OdDbProxyEntity::setColorId
virtual OdResult setColorId(OdDbObjectId colorId, bool doSubents=true)
OdDbProxyEntity::dxfIn
OdResult dxfIn(OdDbDxfFiler *pFiler)
OdDbProxyEntity::OdDbProxyEntity
OdDbProxyEntity()
OdDbObjectId::kNull
static TOOLKIT_EXPORT_STATIC const OdDbObjectId kNull
Definition: DbObjectId.h:118
OdDbProxyEntity::lineWeightChangeAllowed
bool lineWeightChangeAllowed() const
Definition: DbProxyEntity.h:173
OdDb::Visibility
Visibility
Definition: DbObject.h:144
OdDbDxfFiler
Definition: DbFiler.h:194
OdDbProxyEntity::setColorIndex
virtual OdResult setColorIndex(OdUInt16 colorIndex, bool doSubents=true)
OdDbProxyEntity::setMaterial
virtual OdResult setMaterial(OdDbObjectId materialID, bool doSubents=true)
OdDbProxyEntity::ODDB_DECLARE_MEMBERS
ODDB_DECLARE_MEMBERS(OdDbProxyEntity)
TD_PackPush.h
PDF3D_ENUMS::kBoundingBox
@ kBoundingBox
Definition: Pdf3dEnums.h:54
OdDbProxyEntity::graphicsMetafileType
virtual OdDbProxyEntity::GraphicsMetafileType graphicsMetafileType() const
OdDbProxyEntity::GraphicsMetafileType
GraphicsMetafileType
Definition: DbProxyEntity.h:60
OdDbProxyEntityPtr
OdSmartPtr< OdDbProxyEntity > OdDbProxyEntityPtr
Definition: DbProxyEntity.h:372
OdDb::PlotStyleNameType
PlotStyleNameType
Definition: OdaDefs.h:413
OdDbEntity
Definition: DbEntity.h:90
OdDbProxyEntity::subErase
virtual OdResult subErase(bool erasing)
OdDbProxyEntity::setLinetype
virtual OdResult setLinetype(OdDbObjectId linetypeID, bool doSubents=true)
OdDbProxyEntity::setLayer
virtual OdResult setLayer(const OdString &layerName, bool doSubents=true, bool allowHiddenLayer=false)
OdDbProxyEntity::allOperationsAllowed
bool allOperationsAllowed() const
Definition: DbProxyEntity.h:227
OdDbProxyEntity::dwgOutFields
virtual void dwgOutFields(OdDbDwgFiler *pFiler) const
OdDbProxyEntity::subExplode
virtual OdResult subExplode(OdRxObjectPtrArray &entitySet) const ODRX_OVERRIDE
OdDb::LineWeight
LineWeight
Definition: OdaDefs.h:382
OdDbProxyEntity::setLineWeight
virtual OdResult setLineWeight(OdDb::LineWeight lineWeight, bool doSubents=true)
OdDbProxyEntity::subTransformBy
virtual OdResult subTransformBy(const OdGeMatrix3d &xfm) ODRX_OVERRIDE
TOOLKIT_EXPORT
#define TOOLKIT_EXPORT
Definition: DbExport.h:40
ODRX_OVERRIDE
#define ODRX_OVERRIDE
Definition: OdPlatformSettings.h:114
OdDbProxyEntity::setMaterial
virtual OdResult setMaterial(const OdString &materialName, bool doSubents=true)
OdDbProxyEntity::allButCloningAllowed
bool allButCloningAllowed() const
Definition: DbProxyEntity.h:205
OdDbProxyEntity::originalDxfName
virtual OdString originalDxfName() const
OdCmColor
Definition: CmColor.h:59
OdDbIdMapping
Definition: DbIdMapping.h:238
OdDbObject
Definition: DbObject.h:211
OdDbDwgFiler
Definition: DbFiler.h:1031
OdDbProxyEntity::plotStyleNameChangeAllowed
bool plotStyleNameChangeAllowed() const
Definition: DbProxyEntity.h:177
OdDbProxyEntity::subWblockClone
virtual OdDbObjectPtr subWblockClone(OdDbIdMapping &ownerIdMap, OdDbObject *, bool bPrimary) const ODRX_OVERRIDE
OdDbProxyEntity::setLinetype
virtual OdResult setLinetype(const OdString &linetypeName, bool doSubents=true)