Xapian::PositionIterator::Internal Class Reference

Abstract base class for position lists. More...

#include <positionlist.h>

Inheritance diagram for Xapian::PositionIterator::Internal:

Inheritance graph
[legend]
Collaboration diagram for Xapian::PositionIterator::Internal:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Internal ()
 Default constructor.
virtual ~Internal ()
 Destructor.
virtual Xapian::termcount get_size () const=0
 Gets size of position list.
virtual Xapian::termpos get_position () const=0
 Gets current position.
virtual void next ()=0
 Move to the next item in the list.
virtual void skip_to (Xapian::termpos termpos)=0
 Move to the next item in the list >= the specified item.
virtual bool at_end () const=0
 True if we're off the end of the list.

Public Attributes

Xapian::termcount index
 For use by PhrasePostList - ignored by PostingList itself.

Private Member Functions

 Internal (const Internal &)
 Copying is not allowed.
void operator= (const Internal &)
 Assignment is not allowed.

Detailed Description

Abstract base class for position lists.

Definition at line 36 of file positionlist.h.


Constructor & Destructor Documentation

Xapian::PositionIterator::Internal::Internal ( const Internal  )  [private]

Copying is not allowed.

Xapian::PositionIterator::Internal::Internal (  )  [inline]

Default constructor.

Definition at line 46 of file positionlist.h.

virtual Xapian::PositionIterator::Internal::~Internal (  )  [inline, virtual]

Destructor.

Definition at line 49 of file positionlist.h.


Member Function Documentation

void Xapian::PositionIterator::Internal::operator= ( const Internal  )  [private]

Assignment is not allowed.

virtual Xapian::termcount Xapian::PositionIterator::Internal::get_size (  )  const [pure virtual]

Gets size of position list.

This need only be an approximation. Typical use is to look for positional match restrictions (e.g. NEAR, PHRASE) around the least frequent term.

Implemented in FlintPositionList, QuartzPositionList, and InMemoryPositionList.

Referenced by PositionListCmpLt::operator()().

virtual Xapian::termpos Xapian::PositionIterator::Internal::get_position (  )  const [pure virtual]

Gets current position.

Implemented in FlintPositionList, QuartzPositionList, and InMemoryPositionList.

Referenced by ExactPhrasePostList::test_doc().

virtual void Xapian::PositionIterator::Internal::next (  )  [pure virtual]

Move to the next item in the list.

Either next() or skip_to() must be called before get_position()

Implemented in FlintPositionList, QuartzPositionList, and InMemoryPositionList.

Referenced by ExactPhrasePostList::test_doc().

virtual void Xapian::PositionIterator::Internal::skip_to ( Xapian::termpos  termpos  )  [pure virtual]

Move to the next item in the list >= the specified item.

Either next() or skip_to() must be called before get_position()

Implemented in FlintPositionList, QuartzPositionList, and InMemoryPositionList.

Referenced by ExactPhrasePostList::test_doc().

virtual bool Xapian::PositionIterator::Internal::at_end (  )  const [pure virtual]

True if we're off the end of the list.

Implemented in FlintPositionList, QuartzPositionList, and InMemoryPositionList.


Member Data Documentation

Xapian::termcount Xapian::PositionIterator::Internal::index

For use by PhrasePostList - ignored by PostingList itself.

This isn't the most elegant place to put this, but it greatly eases the implementation of PhrasePostList which can't subclass PositionList (since it gets it from PostList::read_position_list())

Definition at line 83 of file positionlist.h.

Referenced by ExactPhrasePostList::start_position_list(), and ExactPhrasePostList::test_doc().


The documentation for this class was generated from the following file:
Documentation for Xapian (version 1.0.10).
Generated on 24 Dec 2008 by Doxygen 1.5.2.