CFx SDK Documentation  2023 SP0
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
#define TOOLKIT_EXPORT
Definition: DbExport.h:40
OdSmartPtr< OdDbProxyEntity > OdDbProxyEntityPtr
unsigned short OdUInt16
#define ODRX_OVERRIDE
OdResult
Definition: OdResult.h:29
#define GETBIT(flags, bit)
Definition: OdaDefs.h:500
static TOOLKIT_EXPORT_STATIC const OdDbObjectId kNull
Definition: DbObjectId.h:118
bool lineWeightChangeAllowed() const
virtual OdResult subTransformBy(const OdGeMatrix3d &xfm) ODRX_OVERRIDE
virtual OdResult setColor(const OdCmColor &color, bool doSubents=true)
bool transformAllowed() const
virtual OdResult setPlotStyleName(OdDb::PlotStyleNameType plotStyleNameType, OdDbObjectId newId=OdDbObjectId::kNull, bool doSubents=true)
virtual OdResult subSetVisibility(OdDb::Visibility visibility, bool doSubents=true)
bool colorChangeAllowed() const
virtual OdResult setLayer(OdDbObjectId layerId, bool doSubents=true, bool allowHiddenLayer=false)
virtual OdResult subExplode(OdRxObjectPtrArray &entitySet) const ODRX_OVERRIDE
virtual OdString originalDxfName() const
virtual OdResult setMaterial(OdDbObjectId materialID, bool doSubents=true)
virtual OdResult dwgInFields(OdDbDwgFiler *pFiler)
virtual OdResult dxfInFields(OdDbDxfFiler *pFiler)
virtual OdResult setLayer(const OdString &layerName, bool doSubents=true, bool allowHiddenLayer=false)
bool plotStyleNameChangeAllowed() const
virtual int proxyFlags() const
virtual OdResult setPlotStyleName(const OdString &plotStyleName, bool doSubents=true)
virtual OdResult setLinetype(const OdString &linetypeName, bool doSubents=true)
bool layerChangeAllowed() const
virtual OdResult setLinetypeScale(double linetypeScale, bool doSubents=true)
virtual OdString applicationDescription() const
virtual void dwgOutFields(OdDbDwgFiler *pFiler) const
virtual OdResult setLinetype(OdDbObjectId linetypeID, bool doSubents=true)
virtual OdDbProxyEntity::GraphicsMetafileType graphicsMetafileType() const
virtual OdResult setColorIndex(OdUInt16 colorIndex, bool doSubents=true)
bool isR13FormatProxy() const
virtual OdResult setMaterial(const OdString &materialName, bool doSubents=true)
virtual OdResult setColorId(OdDbObjectId colorId, bool doSubents=true)
bool linetypeChangeAllowed() const
bool allButCloningAllowed() const
virtual OdDbObjectPtr subWblockClone(OdDbIdMapping &ownerIdMap, OdDbObject *, bool bPrimary) const ODRX_OVERRIDE
bool eraseAllowed() const
virtual OdDbObjectPtr subDeepClone(OdDbIdMapping &ownerIdMap, OdDbObject *, bool bPrimary) const ODRX_OVERRIDE
ODDB_DECLARE_MEMBERS(OdDbProxyEntity)
bool cloningAllowed() const
virtual OdResult setLineWeight(OdDb::LineWeight lineWeight, bool doSubents=true)
bool linetypeScaleChangeAllowed() const
OdResult dxfIn(OdDbDxfFiler *pFiler)
virtual void dxfOutFields(OdDbDxfFiler *pFiler) const
bool allOperationsAllowed() const
bool materialChangeAllowed() const
virtual OdString originalClassName() const
virtual void getReferences(OdTypedIdsArray &objectIds) const
virtual OdResult subErase(bool erasing)
bool visibilityChangeAllowed() const
PlotStyleNameType
Definition: OdaDefs.h:415
LineWeight
Definition: OdaDefs.h:384
Visibility
Definition: DbObject.h:144