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.

79 lines
1.9 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1995 - 1997.
  5. //
  6. // File: appcur.hxx
  7. //
  8. // Contents:
  9. //
  10. // History:
  11. //
  12. //--------------------------------------------------------------------------
  13. #pragma once
  14. #include <ocursor.hxx>
  15. #include <querble.hxx>
  16. #include <recogniz.hxx>
  17. class CHitSink;
  18. class CAppQueriable : public CQueriable
  19. {
  20. public:
  21. CAppQueriable ( CRecognizer& recog, CHitSink& hitSink )
  22. : _recog (recog), _hitSink (hitSink) {}
  23. COccCursor * QueryCursor( const CKey * pkey, BOOL isRange, ULONG & cMaxNodes );
  24. COccCursor * QueryRangeCursor( const CKey * pkeyBegin,
  25. const CKey * pkeyEnd,
  26. ULONG & cMaxNodes );
  27. COccCursor * QuerySynCursor( CKeyArray & keyArr,
  28. BOOL isRange,
  29. ULONG & cMaxNodes );
  30. private:
  31. CRecognizer& _recog;
  32. CHitSink& _hitSink;
  33. };
  34. class CAppCursor : public COccCursor
  35. {
  36. public:
  37. CAppCursor ( CRegionList& regList, CHitSink& hitSink );
  38. // pure virtual overrides for CCursor
  39. WORKID WorkId();
  40. WORKID NextWorkId();
  41. ULONG OccurrenceCount();
  42. ULONG HitCount();
  43. LONG Rank();
  44. ULONG WorkIdCount(); // virtual
  45. OCCURRENCE Occurrence();
  46. OCCURRENCE NextOccurrence();
  47. OCCURRENCE MaxOccurrence() { return 1; }
  48. LONG Hit();
  49. LONG NextHit();
  50. void RatioFinished (ULONG& denom, ULONG& num) {}
  51. private:
  52. void Advance ();
  53. void LoadPosition ();
  54. CHitSink& _hitSink;
  55. CRegionList& _regList;
  56. CRegionIter _regIter;
  57. OCCURRENCE _occ;
  58. BOOL _fWidInvalid;
  59. };