Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

90 lines
2.1 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1993.
  5. //
  6. // File: dindex.hxx
  7. //
  8. // Contents: Disk Index - Base class for on disk indexes
  9. // (ShadowIndex, MasterIndex and MasterMergeIndex)
  10. //
  11. // Classes: CDiskIndex
  12. //
  13. // Functions:
  14. //
  15. // History: 8-18-94 srikants Created
  16. //
  17. //----------------------------------------------------------------------------
  18. #pragma once
  19. #include <pstore.hxx>
  20. #include <perfobj.hxx>
  21. #include <frmutils.hxx>
  22. #include "index.hxx"
  23. #include "physidx.hxx"
  24. class CIndexSnapshot;
  25. class CKeyList;
  26. class CRWStore;
  27. class CIndexRecord;
  28. class CPartition;
  29. //+---------------------------------------------------------------------------
  30. //
  31. // Class: CDiskIndex (pi)
  32. //
  33. // Purpose: Encapsulate directory and give access to pages
  34. //
  35. // Interface:
  36. //
  37. // History: 20-Apr-91 KyleP Added Merge method
  38. // 03-Apr-91 BartoszM Created stub.
  39. // 18-Aug-94 SrikantS Introduced between CIndex and
  40. //
  41. //
  42. //----------------------------------------------------------------------------
  43. class CDiskIndex : public CIndex
  44. {
  45. DECLARE_UNWIND
  46. public:
  47. enum EDiskIndexType { eShadow, eMaster };
  48. CDiskIndex( INDEXID iid, EDiskIndexType idxType )
  49. : CIndex( iid )
  50. {
  51. if ( eMaster == idxType )
  52. MakeMaster();
  53. else MakeShadow();
  54. END_CONSTRUCTION( CDiskIndex );
  55. }
  56. CDiskIndex( INDEXID iid, EDiskIndexType idxType, WORKID widMax )
  57. : CIndex( iid, widMax, eMaster == idxType )
  58. {
  59. END_CONSTRUCTION( CDiskIndex );
  60. }
  61. virtual void Merge( CIndexSnapshot& indSnap,
  62. const CPartition & partn,
  63. CCiFrmPerfCounter & mergeProgress,
  64. BOOL fGetRW ) = 0;
  65. virtual WORKID ObjectId() const = 0;
  66. virtual void AbortMerge() = 0;
  67. virtual void ClearAbortMerge() = 0;
  68. virtual void FillRecord ( CIndexRecord& record ) = 0;
  69. #if CIDBG == 1
  70. void VerifyContents();
  71. #endif
  72. };