dblyindx.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. //
  2. //////////////////////////////////////////////////////////////////////////////
  3. //
  4. // Copyright 2015 Autodesk, Inc. All rights reserved.
  5. //
  6. // Use of this software is subject to the terms of the Autodesk license
  7. // agreement provided at the time of installation or download, or which
  8. // otherwise accompanies this software in either electronic or hard copy form.
  9. //
  10. //////////////////////////////////////////////////////////////////////////////
  11. //
  12. // AcDbIndex is the base class for all index implementations.
  13. //
  14. // These indexes are associated with Block Spaces, and can be used
  15. // to perform an efficient filtered traversal of the block.
  16. //
  17. #ifndef AD_DBLYINDX_H
  18. #define AD_DBLYINDX_H
  19. #include "dbindex.h"
  20. #pragma pack (push, 8)
  21. class AcDbLayerIndex: public AcDbIndex
  22. {
  23. public:
  24. ACDB_DECLARE_MEMBERS(AcDbLayerIndex);
  25. AcDbLayerIndex();
  26. virtual ~AcDbLayerIndex();
  27. virtual AcDbFilteredBlockIterator* newIterator(const AcDbFilter* pFilter)
  28. const;
  29. virtual Acad::ErrorStatus rebuildFull(AcDbIndexUpdateData* pIdxData);
  30. Acad::ErrorStatus compute(AcDbLayerTable* pLT,
  31. AcDbBlockTableRecord* pBTR);
  32. protected:
  33. virtual Acad::ErrorStatus rebuildModified(AcDbBlockChangeIterator* iter);
  34. };
  35. class AcDbImpLayerIndexIterator;
  36. class AcDbLayerFilter;
  37. class AcDbLayerIndexIterator : public AcDbFilteredBlockIterator
  38. {
  39. public:
  40. AcDbLayerIndexIterator(const AcDbLayerIndex* pIndex,
  41. const AcDbLayerFilter* pFilter);
  42. virtual ~AcDbLayerIndexIterator();
  43. virtual Acad::ErrorStatus start();
  44. virtual AcDbObjectId next();
  45. virtual AcDbObjectId id() const;
  46. virtual Acad::ErrorStatus seek(AcDbObjectId id);
  47. virtual double estimatedHitFraction() const;
  48. virtual Acad::ErrorStatus accepts(AcDbObjectId id,
  49. Adesk::Boolean& idPassesFilter) const;
  50. private:
  51. AcDbImpLayerIndexIterator* mpImpIter;
  52. };
  53. #pragma pack (pop)
  54. #endif // AD_DBLYINDX_H