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.

62 lines
1.6 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Copyright (C) 1991-1992, Microsoft Corporation.
  4. //
  5. // File: CONVERT.HXX
  6. //
  7. // Contents: Expression to cursor converter
  8. //
  9. // Classes: CConverter
  10. //
  11. // History: 16-Jul-92 MikeHew Created
  12. //
  13. //----------------------------------------------------------------------------
  14. #pragma once
  15. class CRestriction;
  16. class CNodeRestriction;
  17. class CCursor;
  18. class COccCursor;
  19. class CQueriable;
  20. //+---------------------------------------------------------------------------
  21. //
  22. // Class: CConverter
  23. //
  24. // Purpose: Convert expressions to cursors
  25. //
  26. // Interface:
  27. //
  28. // History: 15-Jul-92 MikeHew Created
  29. //
  30. //----------------------------------------------------------------------------
  31. class CConverter
  32. {
  33. public:
  34. CConverter( CQueriable* pQuerble, ULONG cMaxNodes );
  35. CCursor* QueryCursor ( CRestriction const * pRst );
  36. BOOL TooManyNodes() { return 0 == _cNodesRemaining; }
  37. private:
  38. // Converting expressions to cursors
  39. CCursor* ConvertRst ( CRestriction const * pRst );
  40. CCursor* ConvertNode ( CNodeRestriction const * pNodeRst );
  41. CCursor* ConvertProxNode ( CNodeRestriction const * pNodeRst );
  42. COccCursor* ConvertPhraseNode ( CNodeRestriction const * pNodeRst );
  43. CCursor* ConvertAndNotNode ( XCursor & curAnd, CCurStack & curNot );
  44. CCursor* ConvertVectorNode ( CNodeRestriction const * pNodeRst );
  45. COccCursor* ConvertLeaf ( CRestriction const * pRst );
  46. CQueriable * _pQuerble;
  47. ULONG _cNodesRemaining;
  48. };