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.

77 lines
1.8 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1991 - 1992.
  5. //
  6. // File: PHRCUR.HXX
  7. //
  8. // Contents: Phrase cursor
  9. //
  10. // Classes: CPhraseCursor
  11. //
  12. // History: 24-May-91 BartoszM Created.
  13. //
  14. //----------------------------------------------------------------------------
  15. #pragma once
  16. #include "ocursor.hxx"
  17. class COccCurStack;
  18. //+---------------------------------------------------------------------------
  19. //
  20. // Class: CPhraseCursor
  21. //
  22. // Purpose: Check for phrases
  23. //
  24. // History: 24-May-91 BartoszM Created.
  25. // 28-Feb-92 AmyA Added HitCount and _cOcc.
  26. // 23-Jun-94 SitaramR Added Rank().
  27. //
  28. //----------------------------------------------------------------------------
  29. class CPhraseCursor: public COccCursor
  30. {
  31. public:
  32. CPhraseCursor ( COccCurStack& curStack, XArray<OCCURRENCE>& aOcc );
  33. ~CPhraseCursor();
  34. WORKID WorkId();
  35. WORKID NextWorkId();
  36. OCCURRENCE Occurrence() { return _occ; }
  37. OCCURRENCE NextOccurrence();
  38. ULONG OccurrenceCount();
  39. OCCURRENCE MaxOccurrence();
  40. ULONG HitCount();
  41. LONG Hit();
  42. LONG NextHit();
  43. void RatioFinished ( ULONG& denom, ULONG& num );
  44. LONG Rank();
  45. private:
  46. BOOL FindPhrase();
  47. BOOL FindWidConjunction();
  48. BOOL FindOccConjunction();
  49. WORKID _wid;
  50. OCCURRENCE _occ;
  51. OCCURRENCE _maxOcc; // Max occurrence
  52. unsigned _cCur;
  53. COccCursor** _aCur;
  54. OCCURRENCE* _aOcc;
  55. ULONG _cOcc;
  56. ULONG _logWidMax;
  57. };