CFx SDK Documentation  2022 SP0
DbGroup.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 _ODDBGROUP_INCLUDED_
28 #define _ODDBGROUP_INCLUDED_
29 
30 #include "TD_PackPush.h"
31 
32 #include "DbObject.h"
33 
34 class OdDbGroupIterator;
35 class OdCmColor;
36 class OdDbGroupImpl;
37 class OdDbGroup;
38 
49 {
50 public:
52 
62  OdDb::OpenMode openMode) = 0;
63 
67  virtual OdDbObjectId objectId() const = 0;
68 
72  virtual bool done() const = 0;
73 
80  virtual bool next() = 0;
81 
82  /*
83  virtual OdResult subGetClassID(void* pClsid) const;
84  */
85 protected:
87 };
92 
102 {
103 public:
105 
107 
112 
117 
123  const OdString& description);
124 
128  bool isSelectable() const;
129 
136  bool selectable);
137 
141  OdString name() const;
142 
147  void setName(const OdString& name);
148 
155  bool isNotAccessible() const;
156 
160  bool isAnonymous() const;
161 
168  void setAnonymous();
169 
175  void append(
176  OdDbObjectId objectId);
177 
182  void append(
183  const OdDbObjectIdArray& objectIds);
184 
190  void prepend(
191  OdDbObjectId objectId);
192 
197  void prepend(
198  const OdDbObjectIdArray& objectIds);
199 
206  void insertAt(
207  OdUInt32 insertionIndex,
208  OdDbObjectId objectId);
209 
214  void insertAt(
215  OdUInt32 insertionIndex,
216  const OdDbObjectIdArray& objectIds);
217 
223  void remove(
224  OdDbObjectId objectId);
225 
233  void removeAt(
234  OdUInt32 entityIndex);
235 
240  void remove(
241  const OdDbObjectIdArray& objectIds);
242 
254  void removeAt(
255  OdUInt32 index,
256  const OdDbObjectIdArray& objectIds);
257 
265  void replace(
266  OdDbObjectId oldId,
267  OdDbObjectId newId);
268 
279  void transfer(
280  OdUInt32 fromIndex,
281  OdUInt32 toIndex,
282  OdUInt32 numItems);
283 
290  void clear();
291 
296 
302  bool has(
303  const OdDbEntity* pEntity) const;
304 
311  OdDbObjectIdArray& objectIds) const;
312 
325  void getIndex(
326  OdDbObjectId objectId,
327  OdUInt32& index) const;
328 
332  void reverse();
333 
345  OdUInt16 colorIndex);
346 
352  void setColor(
353  const OdCmColor& color);
354 
360  void setLayer(
361  const OdString& layer);
362 
368  void setLayer(
369  OdDbObjectId layerId);
370 
377  const OdString& linetype);
378 
385  OdDbObjectId linetypeID);
386 
393  double linetypeScale);
394 
401  OdDb::Visibility visibility);
402 
409  const OdString& plotStyleName);
410 
417  OdDb::LineWeight lineWeight);
418 
420  bool newVal);
422  const OdString& materialName);
424  OdDbObjectId materialID);
425 
427  OdDbDwgFiler* pFiler);
428 
429  virtual void dwgOutFields(
430  OdDbDwgFiler* pFiler) const;
431 
433  OdDbDxfFiler* pFiler);
434 
435  virtual void dxfOutFields(
436  OdDbDxfFiler* pFiler) const;
437 
438  virtual void copied (
439  const OdDbObject* pObject,
440  const OdDbObject* pNewObject);
441 
442  virtual void appendToOwner(
443  OdDbIdPair& idPair,
444  OdDbObject* pOwnerObject,
445  OdDbIdMapping& ownerIdMap);
446 
448  void* pClsid) const;
449 
450  virtual void subClose() ODRX_OVERRIDE;
451  virtual OdDbObjectPtr subWblockClone(OdDbIdMapping& ownerIdMap, OdDbObject*, bool bPrimary) const ODRX_OVERRIDE;
452  virtual OdDbObjectPtr subDeepClone(OdDbIdMapping& ownerIdMap, OdDbObject*, bool bPrimary) const ODRX_OVERRIDE;
453 
454  /*
455  void setHighlight(bool newVal);
456  virtual void applyPartialUndo(OdDbDwgFiler* undoFiler, OdRxClass* classObj);
457  virtual OdResult subErase(bool erasing = true);
458  virtual void goodbye(const OdDbObject* dbObj);
459  */
460 
461 };
462 
467 
468 #include "TD_PackPop.h"
469 
470 #endif //_ODDBGROUP_INCLUDED_
471 
#define TOOLKIT_EXPORT
Definition: DbExport.h:40
OdSmartPtr< OdDbGroupIterator > OdDbGroupIteratorPtr
Definition: DbGroup.h:91
unsigned int OdUInt32
unsigned short OdUInt16
#define ODRX_OVERRIDE
OdResult
Definition: OdResult.h:29
OdResult setMaterial(OdDbObjectId materialID)
void setPlotStyleName(const OdString &plotStyleName)
void removeAt(OdUInt32 index, const OdDbObjectIdArray &objectIds)
void setLayer(OdDbObjectId layerId)
bool isAnonymous() const
void append(OdDbObjectId objectId)
virtual void dwgOutFields(OdDbDwgFiler *pFiler) const
virtual void copied(const OdDbObject *pObject, const OdDbObject *pNewObject)
virtual OdResult dwgInFields(OdDbDwgFiler *pFiler)
void getIndex(OdDbObjectId objectId, OdUInt32 &index) const
void setDescription(const OdString &description)
virtual void dxfOutFields(OdDbDxfFiler *pFiler) const
bool isSelectable() const
virtual void subClose() ODRX_OVERRIDE
void setLineweight(OdDb::LineWeight lineWeight)
void remove(const OdDbObjectIdArray &objectIds)
void setColorIndex(OdUInt16 colorIndex)
void prepend(OdDbObjectId objectId)
void prepend(const OdDbObjectIdArray &objectIds)
void removeAt(OdUInt32 entityIndex)
void reverse()
OdDbGroupIteratorPtr newIterator()
virtual OdResult subGetClassID(void *pClsid) const
void setLayer(const OdString &layer)
OdString name() const
OdUInt32 numEntities() const
ODDB_DECLARE_MEMBERS(OdDbGroup)
OdResult setMaterial(const OdString &materialName)
OdResult setHighlight(bool newVal)
bool isNotAccessible() const
void setColor(const OdCmColor &color)
void setLinetype(const OdString &linetype)
void setSelectable(bool selectable)
bool has(const OdDbEntity *pEntity) const
void setAnonymous()
void transfer(OdUInt32 fromIndex, OdUInt32 toIndex, OdUInt32 numItems)
void setName(const OdString &name)
void replace(OdDbObjectId oldId, OdDbObjectId newId)
void clear()
void insertAt(OdUInt32 insertionIndex, OdDbObjectId objectId)
virtual OdResult dxfInFields(OdDbDxfFiler *pFiler)
void setVisibility(OdDb::Visibility visibility)
void setLinetype(OdDbObjectId linetypeID)
void append(const OdDbObjectIdArray &objectIds)
void insertAt(OdUInt32 insertionIndex, const OdDbObjectIdArray &objectIds)
void remove(OdDbObjectId objectId)
OdString description() const
OdUInt32 allEntityIds(OdDbObjectIdArray &objectIds) const
void setLinetypeScale(double linetypeScale)
virtual void appendToOwner(OdDbIdPair &idPair, OdDbObject *pOwnerObject, OdDbIdMapping &ownerIdMap)
virtual bool next()=0
ODRX_DECLARE_MEMBERS(OdDbGroupIterator)
virtual bool done() const =0
virtual OdDbObjectId objectId() const =0
virtual OdDbObjectPtr getObject(OdDb::OpenMode openMode)=0
GLuint index
Definition: gles2_ext.h:265
GLuint const GLchar * name
Definition: gles2_ext.h:265
LineWeight
Definition: OdaDefs.h:382
Visibility
Definition: DbObject.h:144
OpenMode
Definition: DbObjectId.h:54