strus  0.17
Public Member Functions | List of all members
strus::StructIteratorInterface Class Referenceabstract

Structure that represents relations of position info index ranges (directed graph) per document. More...

#include <structIteratorInterface.hpp>

Public Member Functions

virtual ~StructIteratorInterface ()
 Destructor. More...
 
virtual Index skipDoc (const Index &docno)=0
 Return the next document match with a document number higher than or equal to a given document number. More...
 
virtual IndexRange skipPosSource (const Index &firstpos)=0
 Return the first matching source index range with a end position higher than firstpos in the current document or {0,0}. The current document is the one returned with the last 'skipDoc( const Index&)' call. More...
 
virtual IndexRange skipPosSink (const Index &firstpos)=0
 Return the first matching sink index range attached to the current source index range with a end position higher than firstpos in the current document or {0,0}. The current source index range is the one returned with the last 'skipPosSource( const Index&)' call. More...
 
virtual IndexRange source () const =0
 Return the last source index range retrieved with 'skipPosSource( const Index&)' withut calling 'skipDoc( const Index&)' thereafter. More...
 
virtual IndexRange sink () const =0
 Return the last source index range retrieved with 'skipPosSink( const Index&)' withut calling 'skipPosSource( const Index&)' thereafter. More...
 

Detailed Description

Structure that represents relations of position info index ranges (directed graph) per document.

Constructor & Destructor Documentation

virtual strus::StructIteratorInterface::~StructIteratorInterface ( )
inlinevirtual

Destructor.

Member Function Documentation

virtual IndexRange strus::StructIteratorInterface::sink ( ) const
pure virtual

Return the last source index range retrieved with 'skipPosSink( const Index&)' withut calling 'skipPosSource( const Index&)' thereafter.

Returns
a valid index range or {0,0}
virtual Index strus::StructIteratorInterface::skipDoc ( const Index docno)
pure virtual

Return the next document match with a document number higher than or equal to a given document number.

Parameters
[in]docnothe minimum document number to fetch
Returns
a valid local document number or 0
virtual IndexRange strus::StructIteratorInterface::skipPosSink ( const Index firstpos)
pure virtual

Return the first matching sink index range attached to the current source index range with a end position higher than firstpos in the current document or {0,0}. The current source index range is the one returned with the last 'skipPosSource( const Index&)' call.

Parameters
[in]firstposthe minimum position to fetch
Remarks
The index range is not guaranteed to cover 'firstpos', this has to be checked by the called with IndexRange::start >= firstpos of the returned index range
Note
use IndexRange::defined() to check if a matching index range has been found
Returns
a valid index range or {0,0}
virtual IndexRange strus::StructIteratorInterface::skipPosSource ( const Index firstpos)
pure virtual

Return the first matching source index range with a end position higher than firstpos in the current document or {0,0}. The current document is the one returned with the last 'skipDoc( const Index&)' call.

Parameters
[in]firstposthe minimum position to fetch
Remarks
The index range is not guaranteed to cover 'firstpos', this has to be checked by the called with IndexRange::start >= firstpos of the returned index range
Note
use IndexRange::defined() to check if a matching index range has been found
Returns
a valid index range or {0,0}
virtual IndexRange strus::StructIteratorInterface::source ( ) const
pure virtual

Return the last source index range retrieved with 'skipPosSource( const Index&)' withut calling 'skipDoc( const Index&)' thereafter.

Returns
a valid index range or {0,0}

The documentation for this class was generated from the following file: