CFx SDK Documentation 2026 SP0
Loading...
Searching...
No Matches
DbSymbolTable.h
Go to the documentation of this file.
1
2// Copyright (C) 2002-2024, 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 Open Design Alliance software pursuant to a license
16// agreement with Open Design Alliance.
17// Open Design Alliance Copyright (C) 2002-2024 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 _ODDBSYMBOLTABLE_INCLUDED
28#define _ODDBSYMBOLTABLE_INCLUDED
29
30#include "TD_PackPush.h"
31
32#include "DbObject.h"
33#include "DbRangeIterator.h"
34
39
48
49
69
88{
89public:
91
99
115 const OdString& sName,
116 OdDb::OpenMode openMode,
117 bool getErasedRecord = false) const;
118
130 const OdString& sName,
131 bool getErasedRecord = false) const;
132
133
144 virtual bool has( const OdString& sName ) const;
145
156 virtual bool has( const OdDbObjectId& objectId ) const;
157
158
171 bool atBeginning = true,
172 bool skipDeleted = true) const;
173
180 inline OdDbRecordIdCollectionView ids(bool atBeginning = true, bool skipDeleted = true);
181
188 inline OdDbRecordCollectionView records(bool atBeginning = true, bool skipDeleted = true);
189
207
208
210 OdDbDwgFiler* pFiler);
211
212 virtual void dwgOutFields(
213 OdDbDwgFiler* pFiler) const;
214
216 OdDbDxfFiler* pFiler);
217
218 virtual void dxfOutFields(
219 OdDbDxfFiler* pFiler) const;
220
222 OdDbDxfFiler* pFiler);
223
224 virtual void dxfOut(
225 OdDbDxfFiler* pFiler) const;
226
228 OdDbDxfFiler* pFiler);
229
230 virtual void dxfOutFields_R12(
231 OdDbDxfFiler* pFiler) const;
232};
233
242
243
244
245class OdDbSymbolTableIteratorImpl;
246
255{
256public:
258
268 virtual void start(
269 bool atBeginning = true,
270 bool skipErased = true);
271
275 virtual bool done() const;
276
280 virtual OdDbObjectId getRecordId() const;
281
293 bool openErasedRecord = false) const;
294
301 virtual void step(
302 bool forward = true,
303 bool skipErased = true);
304
309 virtual void seek(
310 const OdDbObjectId& ObjectId);
311
316 virtual void seek(
317 const OdDbSymbolTableRecord* pRecord);
318
320protected:
321 friend class OdDbSymbolTable;
322
325 OdDbSymbolTableIteratorImpl* pImpl);
326
327 OdDbSymbolTableIteratorImpl* m_pImpl;
328};
329
330#include <DbSymbolTableRecord.h>
331//DOM-IGNORE-BEGIN
333{
334 OdDbSymbolTableIteratorPtr m_pIterator;
335public:
336 struct Iterator : OdDbStepIteratorWrap<OdDbSymbolTableIterator>
337 {
341 reference operator*() const { return m_pIterator->getRecordId(); }
342 };
344 Iterator begin() const { return Iterator(m_pIterator); }
346};
347
363
364OdDbRecordIdCollectionView OdDbSymbolTable::ids(bool atBeginning, bool skipDeleted)
365{
366 return OdDbRecordIdCollectionView(newIterator(atBeginning, skipDeleted));
367}
368
369OdDbRecordCollectionView OdDbSymbolTable::records(bool atBeginning, bool skipDeleted)
370{
371 return OdDbRecordCollectionView(newIterator(atBeginning, skipDeleted));
372}
373//DOM-IGNORE-END
374
375
376#include "TD_PackPop.h"
377
378#endif // _ODDBSYMBOLTABLE_INCLUDED
379
OdSmartPtr< OdDbSymbolTable > OdDbSymbolTablePtr
Definition DbDatabase.h:117
#define TOOLKIT_EXPORT
Definition DbExport.h:40
OdSmartPtr< OdDbSymbolTableRecord > OdDbSymbolTableRecordPtr
OdSmartPtr< OdDbSymbolTableIterator > OdDbSymbolTableIteratorPtr
OdResult
Definition OdResult.h:29
OdDbObjectId objectId() const
OdDbRecordCollectionView(const OdDbSymbolTableIteratorPtr &i)
OdDbRecordIdCollectionView(const OdDbSymbolTableIteratorPtr &i)
OdDbStepIteratorWrap(const OdSmartPtr< OdDbSymbolTableIterator > &i)
OdSmartPtr< OdDbSymbolTableIterator > m_pIterator
virtual bool has(const OdDbObjectId &objectId) const
OdDbRecordCollectionView records(bool atBeginning=true, bool skipDeleted=true)
virtual void dxfOut(OdDbDxfFiler *pFiler) const
virtual OdDbObjectId getAt(const OdString &sName, bool getErasedRecord=false) const
ODDB_DECLARE_MEMBERS(OdDbSymbolTable)
virtual void dwgOutFields(OdDbDwgFiler *pFiler) const
OdDbRecordIdCollectionView ids(bool atBeginning=true, bool skipDeleted=true)
virtual OdResult dxfIn(OdDbDxfFiler *pFiler)
virtual OdResult dwgInFields(OdDbDwgFiler *pFiler)
virtual OdResult dxfInFields(OdDbDxfFiler *pFiler)
virtual void dxfOutFields(OdDbDxfFiler *pFiler) const
virtual OdDbObjectId add(OdDbSymbolTableRecord *pRecord)
virtual OdDbSymbolTableRecordPtr getAt(const OdString &sName, OdDb::OpenMode openMode, bool getErasedRecord=false) const
virtual bool has(const OdString &sName) const
virtual OdResult dxfInFields_R12(OdDbDxfFiler *pFiler)
virtual OdDbSymbolTableIteratorPtr newIterator(bool atBeginning=true, bool skipDeleted=true) const
virtual void dxfOutFields_R12(OdDbDxfFiler *pFiler) const
virtual void step(bool forward=true, bool skipErased=true)
OdDbSymbolTableIteratorImpl * m_pImpl
virtual OdDbSymbolTableRecordPtr getRecord(OdDb::OpenMode openMode=OdDb::kForRead, bool openErasedRecord=false) const
virtual bool done() const
virtual ~OdDbSymbolTableIterator()
virtual void seek(const OdDbObjectId &ObjectId)
OdDbSymbolTableIterator(OdDbSymbolTableIteratorImpl *pImpl)
virtual OdDbObjectId getRecordId() const
virtual void start(bool atBeginning=true, bool skipErased=true)
ODRX_DECLARE_MEMBERS(OdDbSymbolTableIterator)
virtual void seek(const OdDbSymbolTableRecord *pRecord)
OdDbObjectId existingRecordId() const
OdError_DuplicateRecordName(OdDbObjectId existingRecId)
OdError(OdResult code)
@ kForRead
Definition DbObjectId.h:56
OdDbSymbolTableRecordPtr reference
OdDbSymbolTableRecordPtr value_type
OdDbSymbolTableRecordPtr operator*() const
Iterator(const OdDbSymbolTableIteratorPtr &i)
Iterator(const OdDbSymbolTableIteratorPtr &i)