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.

71 lines
1.6 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1991 - 1992.
  5. //
  6. // File: ANDCUR.HXX
  7. //
  8. // Contents: And cursor
  9. //
  10. // Classes: CAndCursor
  11. //
  12. // History: 24-May-91 BartoszM Created.
  13. //
  14. //----------------------------------------------------------------------------
  15. #pragma once
  16. #ifdef DISPLAY_INCLUDES
  17. #pragma message( "#include <" __FILE__ ">..." )
  18. #endif
  19. #include <cursor.hxx>
  20. #include <curstk.hxx>
  21. //+---------------------------------------------------------------------------
  22. //
  23. // Class: CAndCursor
  24. //
  25. // Purpose: Boolean And cursor (find documents that contain all of
  26. // the specified keys). Works with a single index.
  27. //
  28. // History: 24-May-91 BartoszM Created.
  29. // 30-Sep-91 BartoszM Removed CIndexCursor methods
  30. // 28-Feb-92 AmyA Added HitCount()
  31. // 14-Apr-92 AmyA Added Rank()
  32. //
  33. //----------------------------------------------------------------------------
  34. class CAndCursor: public CCursor
  35. {
  36. public:
  37. CAndCursor ( unsigned cCursor, CCurStack& curStack );
  38. ~CAndCursor();
  39. WORKID WorkId();
  40. WORKID NextWorkId();
  41. ULONG HitCount();
  42. LONG Rank();
  43. LONG Hit();
  44. LONG NextHit();
  45. void RatioFinished ( ULONG& denom, ULONG& num );
  46. protected:
  47. BOOL FindConjunction();
  48. WORKID _wid;
  49. unsigned _cCur;
  50. unsigned _iCur;
  51. CCursor** _aCur;
  52. LONG _lMaxWeight; // Max Weight of any child
  53. };