Leaked source code of windows server 2003
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.

66 lines
1.7 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1991 - 1992.
  5. //
  6. // File: FRESHCUR.HXX
  7. //
  8. // Contents: Fresh cursor
  9. //
  10. // Classes: CFreshCursor
  11. //
  12. // History: 16-May-91 BartoszM Created.
  13. //
  14. //----------------------------------------------------------------------------
  15. #pragma once
  16. #include "indsnap.hxx"
  17. //+---------------------------------------------------------------------------
  18. //
  19. // Class: CFreshCursor
  20. //
  21. // Purpose: Use the fresh list to prune out stale data
  22. //
  23. // History: 16-May-91 BartoszM Created.
  24. // 30-Sep-91 BartoszM Simplified
  25. // 28-Feb-92 AmyA Added HitCount()
  26. // 14-Apr-92 AmyA Added Rank()
  27. // 28-Arp-92 BartoszM Use Index Array
  28. // 28-Sep-94 SrikantS Reversed the ordering of
  29. // _indSnap and _cur.
  30. //
  31. //----------------------------------------------------------------------------
  32. class CFreshCursor : public CCursor
  33. {
  34. public:
  35. CFreshCursor ( XCursor & cur, CIndexSnapshot& indSnap );
  36. virtual ~CFreshCursor() {}
  37. WORKID WorkId();
  38. WORKID NextWorkId();
  39. ULONG WorkIdCount();
  40. ULONG HitCount();
  41. LONG Rank();
  42. ULONG GetRankVector( LONG * plVector, ULONG cElements );
  43. void RatioFinished ( ULONG& denom, ULONG& num );
  44. private:
  45. void LoadWorkId();
  46. WORKID _wid;
  47. CIndexSnapshot _indSnap;
  48. XCursor _cur;
  49. };