CFx SDK Documentation  2020SP3
DbDictionary.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 _ODDBDICTIONARY_INCLUDED_
28 #define _ODDBDICTIONARY_INCLUDED_
29 
30 #include "TD_PackPush.h"
31 
32 #include "RxIterator.h"
33 #include "RxDefs.h"
34 #include "DbObject.h"
35 
36 class OdDbDictionaryImpl;
37 class OdDbObjectId;
38 class OdString;
39 
53 {
54 public:
56 
58 
63  virtual OdString name() const = 0;
64 
74  OdDb::OpenMode openMode = OdDb::kForRead) = 0;
75 
80  virtual OdDbObjectId objectId() const = 0;
81 
91  virtual bool setPosition(
92  OdDbObjectId objectId) = 0;
93 
100  virtual OdRxObjectPtr object() const;
101 
102 protected:
103 
105 };
106 
111 
135 {
137 
138 protected:
140 
141 public:
154  const OdString& name,
155  OdDb::OpenMode mode) const;
156 
169  const OdString& name,
170  OdResult* pStatus = 0) const;
171 
181  const OdDbObjectId& objectId) const;
182 
188  bool has(
189  const OdString& name) const;
190 
196  bool has(
197  const OdDbObjectId& objectId) const;
198 
203 
215  const OdString& name);
216 
228  void remove(
229  const OdDbObjectId& objectId);
230 
240  bool setName(
241  const OdString& oldName,
242  const OdString& newName);
243 
260  const OdString& name,
261  OdDbObject* newValue);
262 
269  bool isTreatElementsAsHard() const;
270 
280  bool doIt);
281 
297  OdRx::DictIterType iterType = OdRx::kDictCollated) const;
298 
299  enum
300  {
301  kMaxSuggestNameSize = 2049
302  };
310  OdString suggestName(const OdString& strFilePath, const int nMaxLength = kMaxSuggestNameSize) const;
311 
313  OdDbDwgFiler* pFiler);
314 
315  virtual void dwgOutFields(
316  OdDbDwgFiler* pFiler) const;
317 
319  OdDbDxfFiler* pFiler);
320 
321  virtual void dxfOutFields(
322  OdDbDxfFiler* pFiler) const;
323 
328 
334  virtual void setMergeStyle(
335  OdDb::DuplicateRecordCloning mergeStyle);
336 
337  virtual void goodbye(
338  const OdDbObject* pObject);
339 
340  virtual void erased(
341  const OdDbObject* pObject,
342  bool erasing = true);
343 
345  void* pClsid) const;
346 
347  virtual void applyPartialUndo(
348  OdDbDwgFiler* pFiler,
349  OdRxClass* pClass);
350 
351  virtual void subClose();
352 };
353 
358 
359 #include "TD_PackPop.h"
360 
361 #endif
362 
OdResult
OdResult
Definition: OdResult.h:29
OdDbDictionary::has
bool has(const OdDbObjectId &objectId) const
OdDbDictionary::setMergeStyle
virtual void setMergeStyle(OdDb::DuplicateRecordCloning mergeStyle)
OdDbDictionary::setName
bool setName(const OdString &oldName, const OdString &newName)
OdDbDictionary::subClose
virtual void subClose()
OdDbDictionary::getAt
OdDbObjectId getAt(const OdString &name, OdResult *pStatus=0) const
OdDbDictionary::nameAt
OdString nameAt(const OdDbObjectId &objectId) const
OdString
Definition: OdString.h:95
OdDbDictionary::remove
OdDbObjectId remove(const OdString &name)
OdDbDictionary::dxfInFields
virtual OdResult dxfInFields(OdDbDxfFiler *pFiler)
OdRxIterator
Definition: RxIterator.h:46
OdRxObjectPtr
Definition: RxObject.h:345
OdDbDictionary::dwgInFields
virtual OdResult dwgInFields(OdDbDwgFiler *pFiler)
OdDbDictionaryIteratorPtr
OdSmartPtr< OdDbDictionaryIterator > OdDbDictionaryIteratorPtr
Definition: DbDictionary.h:110
OdDbDictionary::suggestName
OdString suggestName(const OdString &strFilePath, const int nMaxLength=kMaxSuggestNameSize) const
name
GLuint const GLchar * name
Definition: gles2_ext.h:265
OdDbDictionaryIterator::object
virtual OdRxObjectPtr object() const
DbObject.h
OdDbDictionary::mergeStyle
virtual OdDb::DuplicateRecordCloning mergeStyle() const
OdDbObjectId
Definition: DbObjectId.h:99
OdDbDictionaryIterator::OdDbDictionaryIterator
OdDbDictionaryIterator()
Definition: DbDictionary.h:104
OdDbDictionary::setTreatElementsAsHard
void setTreatElementsAsHard(bool doIt)
RxIterator.h
OdDbDictionaryIterator::setPosition
virtual bool setPosition(OdDbObjectId objectId)=0
OdDbDictionaryIterator::getObject
virtual OdDbObjectPtr getObject(OdDb::OpenMode openMode=OdDb::kForRead)=0
TD_PackPop.h
OdDbDictionary::OdDbDictionary
OdDbDictionary()
OdDbDictionaryIterator
Definition: DbDictionary.h:53
OdDbDictionary::isTreatElementsAsHard
bool isTreatElementsAsHard() const
OdUInt32
unsigned int OdUInt32
Definition: OdPlatformSettings.h:783
OdDbDictionary::setAt
OdDbObjectId setAt(const OdString &name, OdDbObject *newValue)
OdDbDictionary::newIterator
OdDbDictionaryIteratorPtr newIterator(OdRx::DictIterType iterType=OdRx::kDictCollated) const
OdDbDictionary::dxfOutFields
virtual void dxfOutFields(OdDbDxfFiler *pFiler) const
OdDbDictionary::remove
void remove(const OdDbObjectId &objectId)
OdDbObject::ODDB_DECLARE_MEMBERS
ODDB_DECLARE_MEMBERS(OdDbObject)
OdDb::kForRead
@ kForRead
Definition: DbObjectId.h:56
OdDbDictionaryIterator::name
virtual OdString name() const =0
OdRxClass
Definition: RxObject.h:865
OdRx::DictIterType
DictIterType
Definition: RxDefs.h:38
RxDefs.h
OdDbDictionary::goodbye
virtual void goodbye(const OdDbObject *pObject)
OdSmartPtr< OdDbObject >
OdDbDictionary::numEntries
OdUInt32 numEntries() const
OdDbDictionary::getAt
OdDbObjectPtr getAt(const OdString &name, OdDb::OpenMode mode) const
OdDbDictionaryIterator::~OdDbDictionaryIterator
virtual ~OdDbDictionaryIterator()
Definition: DbDictionary.h:57
OdDbDictionary::applyPartialUndo
virtual void applyPartialUndo(OdDbDwgFiler *pFiler, OdRxClass *pClass)
OdDbDictionary
Definition: DbDictionary.h:135
OdDbDictionaryIterator::ODRX_DECLARE_MEMBERS
ODRX_DECLARE_MEMBERS(OdDbDictionaryIterator)
OdDbDictionary::has
bool has(const OdString &name) const
OdRx::kDictCollated
@ kDictCollated
Definition: RxDefs.h:40
OdDbDxfFiler
Definition: DbFiler.h:194
TD_PackPush.h
OdDb::OpenMode
OpenMode
Definition: DbObjectId.h:54
OdDbDictionary::dwgOutFields
virtual void dwgOutFields(OdDbDwgFiler *pFiler) const
OdDbDictionary::subGetClassID
virtual OdResult subGetClassID(void *pClsid) const
TOOLKIT_EXPORT
#define TOOLKIT_EXPORT
Definition: DbExport.h:40
OdDbDictionaryPtr
OdSmartPtr< OdDbDictionary > OdDbDictionaryPtr
Definition: DbDictionary.h:357
OdDb::DuplicateRecordCloning
DuplicateRecordCloning
Definition: DbObject.h:126
OdDbDictionary::erased
virtual void erased(const OdDbObject *pObject, bool erasing=true)
OdDbObject
Definition: DbObject.h:211
OdDbDwgFiler
Definition: DbFiler.h:1031
OdDbDictionaryIterator::objectId
virtual OdDbObjectId objectId() const =0