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.

70 lines
1.7 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1991 - 1992.
  5. //
  6. // File: ocursor.hxx
  7. //
  8. // Contents: Occurrence Cursor Class
  9. //
  10. // Classes: COccCursor
  11. //
  12. // History: 19-Feb-92 AmyA Created.
  13. //
  14. //----------------------------------------------------------------------------
  15. #pragma once
  16. #include <cursor.hxx>
  17. const RANK_MULTIPLIER = 16; // Rank is scaled by this number
  18. //+---------------------------------------------------------------------------
  19. //
  20. // Class: COccCursor
  21. //
  22. // Purpose: The root class for all occurrence cursors and CKeyCursor
  23. //
  24. // Interface:
  25. //
  26. // History: 19-Feb-92 AmyA Created.
  27. // 14-Apr-92 AmyA Added Rank().
  28. // 23-Jun-94 SitaramR Added _widMax and MaxWorkId().
  29. //
  30. //----------------------------------------------------------------------------
  31. class COccCursor : public CCursor
  32. {
  33. public:
  34. COccCursor ( INDEXID iid, WORKID widMax )
  35. : CCursor(iid), _widMax(widMax) {}
  36. COccCursor (WORKID widMax) : _widMax(widMax) {}
  37. COccCursor () : _widMax(0) {}
  38. virtual OCCURRENCE Occurrence() = 0;
  39. virtual OCCURRENCE NextOccurrence() = 0;
  40. virtual ULONG OccurrenceCount() = 0;
  41. virtual OCCURRENCE MaxOccurrence() = 0;
  42. virtual LONG Rank() { return MAX_QUERY_RANK; }
  43. virtual BOOL IsEmpty() { return Occurrence() == OCC_INVALID; }
  44. virtual WORKID MaxWorkId() { return _widMax; }
  45. #ifdef CIEXTMODE
  46. void CiExtDump(void *ciExtSelf);
  47. #endif
  48. protected:
  49. WORKID _widMax;
  50. };