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 33 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 43 of file positionlist.h.

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

Destructor.

Definition at line 46 of file positionlist.h.


Member Function Documentation

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

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

Implemented in BrassPositionList, ChertPositionList, FlintPositionList, and InMemoryPositionList.

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

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 BrassPositionList, ChertPositionList, FlintPositionList, and InMemoryPositionList.

Referenced by PositionListCmpLt::operator()().

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()

  • the list initially points to before the beginning of the list.

Implemented in BrassPositionList, ChertPositionList, FlintPositionList, and InMemoryPositionList.

Referenced by ExactPhrasePostList::test_doc().

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

Assignment is not allowed.

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()

  • the list initially points to before the beginning of the list.

Implemented in BrassPositionList, ChertPositionList, FlintPositionList, and InMemoryPositionList.

Referenced by ExactPhrasePostList::test_doc().


Member Data Documentation

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 80 of file positionlist.h.

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


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

Documentation for Xapian (version 1.2.8).
Generated on 14 Dec 2011 by Doxygen 1.5.9.