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
62 lines
1.6 KiB
//+---------------------------------------------------------------------------
|
|
//
|
|
// Copyright (C) 1991-1992, Microsoft Corporation.
|
|
//
|
|
// File: CONVERT.HXX
|
|
//
|
|
// Contents: Expression to cursor converter
|
|
//
|
|
// Classes: CConverter
|
|
//
|
|
// History: 16-Jul-92 MikeHew Created
|
|
//
|
|
//----------------------------------------------------------------------------
|
|
|
|
#pragma once
|
|
|
|
class CRestriction;
|
|
class CNodeRestriction;
|
|
|
|
class CCursor;
|
|
class COccCursor;
|
|
class CQueriable;
|
|
|
|
//+---------------------------------------------------------------------------
|
|
//
|
|
// Class: CConverter
|
|
//
|
|
// Purpose: Convert expressions to cursors
|
|
//
|
|
// Interface:
|
|
//
|
|
// History: 15-Jul-92 MikeHew Created
|
|
//
|
|
//----------------------------------------------------------------------------
|
|
|
|
class CConverter
|
|
{
|
|
public:
|
|
|
|
CConverter( CQueriable* pQuerble, ULONG cMaxNodes );
|
|
CCursor* QueryCursor ( CRestriction const * pRst );
|
|
|
|
BOOL TooManyNodes() { return 0 == _cNodesRemaining; }
|
|
|
|
private:
|
|
|
|
// Converting expressions to cursors
|
|
|
|
CCursor* ConvertRst ( CRestriction const * pRst );
|
|
CCursor* ConvertNode ( CNodeRestriction const * pNodeRst );
|
|
CCursor* ConvertProxNode ( CNodeRestriction const * pNodeRst );
|
|
COccCursor* ConvertPhraseNode ( CNodeRestriction const * pNodeRst );
|
|
CCursor* ConvertAndNotNode ( XCursor & curAnd, CCurStack & curNot );
|
|
CCursor* ConvertVectorNode ( CNodeRestriction const * pNodeRst );
|
|
COccCursor* ConvertLeaf ( CRestriction const * pRst );
|
|
|
|
CQueriable * _pQuerble;
|
|
|
|
ULONG _cNodesRemaining;
|
|
};
|
|
|
|
|