Newer
Older
jsclose
committed
//
// Created by Jake Close on 3/13/18.
//
#pragma once
#include "ISR.h"
jsclose
committed
// Find occurrences of any child ISR.
jsclose
committed
{
jsclose
committed
Location First ( ) override;
Location Next ( ) override;
Location NextDocument ( ) override;
Location Seek ( Location target ) override;
Location GetEndDocument ( ) override;
currentTerm->First( );
Location currentLocation = currentTerm->currentLocation;
if ( currentLocation < nearestStartLocation )
nearestTerm = currentTerm;
nearestStartLocation = currentLocation;
if ( currentLocation > nearestEndLocation )
{
nearestEndLocation = currentLocation;
}
++NumberOfTerms;
private:
ISR *nearestTerm;
// nearStartLocation and nearestEndLocation are// the start and end of the nearestTerm.
Location nearestStartLocation, nearestEndLocation;