CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
DbIndex.h
Go to the documentation of this file.
1
2// Copyright (C) 2002-2022, 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-2022 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_DBINDEX_H
28#define OD_DBINDEX_H
29
30#include "TD_PackPush.h"
31
32class OdDbDate;
33class OdDbIndexIterator;
34class OdDbFilter;
37class OdDbFilter;
41class OdDbBlockChangeIteratorImpl;
42class OdDbIndexUpdateDataImpl;
43class OdDbIndexUpdateDataIteratorImpl;
45
46#include "DbFilter.h"
47
52
54 OdDbBlockTableRecord* pBlock,
55 int indexCtlVal,
56 OdDbBlockChangeIterator* pBlkChgIter,
57 OdDbIndexUpdateData* pIdxUpdData);
58
59
66{
67private:
68 friend class OdDbBlockChangeIteratorImpl;
69 OdDbBlockChangeIteratorImpl* m_pImpl;
70 OdDbBlockChangeIterator() : m_pImpl(0) {}
73public:
74
81 void start();
82
87
91 void next();
92
96 bool done();
97
107 OdDbObjectId& currentId,
108 OdUInt8& flags,
109 OdUInt32& data) const;
110
118 OdUInt8 flags,
119 OdUInt32 data);
120
125
130};
131
138{
139 friend class OdDbIndexUpdateDataImpl;
140 OdDbIndexUpdateDataImpl* m_pImpl;
141 OdDbIndexUpdateData() : m_pImpl(0) {}
143 const OdDbIndexUpdateData&);
144public:
146 {
147 kModified = 1, // Modified RO
148 kDeleted = 2, // Deleted RO
149 kProcessed = 4, // Processed RW
150 kUnknownKey = 8 // Unknown key
151 };
156
157
163 void addId(
164 OdDbObjectId objectId);
165
176 OdDbObjectId objectId,
177 OdUInt8 flags);
178
189 OdDbObjectId objectId,
190 OdUInt32 data);
191
202 OdDbObjectId objectId,
203 OdUInt32& data) const;
204
215 OdDbObjectId objectId,
216 OdUInt8& flags) const;
217
229 OdDbObjectId objectId,
230 OdUInt8& flags,
231 OdUInt32& data) const;
232};
233
240{
241 friend class OdDbIndexUpdateDataIteratorImpl;
242 OdDbIndexUpdateDataIteratorImpl* m_pImpl;
243public:
245 const OdDbIndexUpdateData* pIndexUpdateData);
246
253 void start();
254
259
263 void next();
264
268 bool done();
269
279 OdDbObjectId& currentId,
280 OdUInt8& flags,
281 OdUInt32& data) const;
282};
283
284
291{
292public:
294
296
297
304 const OdDbFilter* pFilter) const;
305
310 virtual void rebuildFull(
311 OdDbIndexUpdateData* pIdxData);
312
319 const OdDbDate& time);
320
325
332 const OdDbDate& time);
333
338
342 bool isUptoDate() const;
343
345 OdDbDwgFiler* pFiler);
346
347 virtual void dwgOutFields(
348 OdDbDwgFiler* pFiler) const;
349
351 OdDbDxfFiler* pFiler);
352
353 virtual void dxfOutFields(
354 OdDbDxfFiler* pFiler) const;
355
356protected:
357
369 virtual void rebuildModified(
370 OdDbBlockChangeIterator* iterator);
371
372 friend class OdDbIndexImpl;
375 int indexCtlVal,
376 OdDbBlockChangeIterator* pBlkChgIter,
377 OdDbIndexUpdateData* pIdxUpdData );
378};
383
386
393{
401 OdDbDatabase* pDb);
402
414 OdDbIndex* pIndex);
415
424 const OdRxClass* key);
425
426
435 const OdDbBlockTableRecord* pBTR,
436 const OdRxClass* key,
437 OdDb::OpenMode readOrWrite = OdDb::kForRead);
438
442 const OdDbBlockTableRecord* pBTR,
443 int btrIndex,
444 OdDb::OpenMode readOrWrite = OdDb::kForRead);
445
452 const OdDbBlockTableRecord* pBTR);
453
464 OdDbBlockReference* pBlkRef,
465 OdDbFilter* pFilter);
466
474 OdDbBlockReference* pBlkRef,
475 const OdRxClass* key);
476
485 const OdDbBlockReference* pBlkRef,
486 const OdRxClass* key,
487 OdDb::OpenMode readOrWrite);
488
492 const OdDbBlockReference* pBlkRef,
493 int btrIndex,
494 OdDb::OpenMode readOrWrite);
495
502 const OdDbBlockReference* pBlkRef);
503}
504
505#include "TD_PackPop.h"
506
507#endif // OD_DBINDEX_H
508
#define TOOLKIT_EXPORT
Definition: DbExport.h:40
OdSmartPtr< OdDbIndex > OdDbIndexPtr
Definition: DbIndex.h:382
void processBTRIndexObjects(OdDbBlockTableRecord *pBlock, int indexCtlVal, OdDbBlockChangeIterator *pBlkChgIter, OdDbIndexUpdateData *pIdxUpdData)
OdSmartPtr< OdDbFilteredBlockIterator > OdDbFilteredBlockIteratorPtr
Definition: DbIndex.h:51
unsigned int OdUInt32
unsigned char OdUInt8
OdResult
Definition: OdResult.h:29
void setCurIdInfo(OdUInt8 flags, OdUInt32 data)
void curIdInfo(OdDbObjectId &currentId, OdUInt8 &flags, OdUInt32 &data) const
OdDbIndexUpdateData * updateData() const
OdDbObjectId id() const
virtual void rebuildFull(OdDbIndexUpdateData *pIdxData)
void setLastUpdatedAt(const OdDbDate &time)
ODDB_DECLARE_MEMBERS(OdDbIndex)
virtual void dxfOutFields(OdDbDxfFiler *pFiler) const
virtual OdResult dxfInFields(OdDbDxfFiler *pFiler)
virtual void dwgOutFields(OdDbDwgFiler *pFiler) const
bool isUptoDate() const
friend void processBTRIndexObjects(OdDbBlockTableRecord *pBTR, int indexCtlVal, OdDbBlockChangeIterator *pBlkChgIter, OdDbIndexUpdateData *pIdxUpdData)
virtual OdResult dwgInFields(OdDbDwgFiler *pFiler)
void setLastUpdatedAtU(const OdDbDate &time)
virtual void rebuildModified(OdDbBlockChangeIterator *iterator)
OdDbDate lastUpdatedAtU() const
OdDbDate lastUpdatedAt() const
virtual OdDbFilteredBlockIteratorPtr newIterator(const OdDbFilter *pFilter) const
bool setIdData(OdDbObjectId objectId, OdUInt32 data)
bool setIdFlags(OdDbObjectId objectId, OdUInt8 flags)
bool getIdFlags(OdDbObjectId objectId, OdUInt8 &flags) const
bool getIdData(OdDbObjectId objectId, OdUInt32 &data) const
void addId(OdDbObjectId objectId)
OdDbObjectId objectBeingIndexedId() const
bool getFlagsAndData(OdDbObjectId objectId, OdUInt8 &flags, OdUInt32 &data) const
OdDbObjectId id() const
void currentData(OdDbObjectId &currentId, OdUInt8 &flags, OdUInt32 &data) const
OdDbIndexUpdateDataIterator(const OdDbIndexUpdateData *pIndexUpdateData)
GLint GLenum GLsizei GLsizei GLint GLsizei const void * data
Definition: gles2_ext.h:110
OpenMode
Definition: DbObjectId.h:54
@ kForRead
Definition: DbObjectId.h:56
TOOLKIT_EXPORT void addIndex(OdDbBlockTableRecord *pBTR, OdDbIndex *pIndex)
TOOLKIT_EXPORT OdDbFilterPtr getFilter(const OdDbBlockReference *pBlkRef, const OdRxClass *key, OdDb::OpenMode readOrWrite)
TOOLKIT_EXPORT OdDbIndexPtr getIndex(const OdDbBlockTableRecord *pBTR, const OdRxClass *key, OdDb::OpenMode readOrWrite=OdDb::kForRead)
TOOLKIT_EXPORT void addFilter(OdDbBlockReference *pBlkRef, OdDbFilter *pFilter)
TOOLKIT_EXPORT int numFilters(const OdDbBlockReference *pBlkRef)
TOOLKIT_EXPORT void removeIndex(OdDbBlockTableRecord *pBTR, const OdRxClass *key)
TOOLKIT_EXPORT void removeFilter(OdDbBlockReference *pBlkRef, const OdRxClass *key)
TOOLKIT_EXPORT void updateIndexes(OdDbDatabase *pDb)
TOOLKIT_EXPORT int numIndexes(const OdDbBlockTableRecord *pBTR)