InMemoryPositionList Class Reference

A position list in a inemory database. More...

#include <inmemory_positionlist.h>

Inheritance diagram for InMemoryPositionList:

Inheritance graph
[legend]
Collaboration diagram for InMemoryPositionList:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 InMemoryPositionList ()
 Default constructor.
 InMemoryPositionList (const OmDocumentTerm::term_positions &positions_)
 Construct, fill list with data, and move the position to the start.
 ~InMemoryPositionList ()
 Destructor.
void set_data (const OmDocumentTerm::term_positions &positions_)
 Fill list with data, and move the position to the start.
Xapian::termcount get_size () const
 Gets size of position list.
Xapian::termpos get_position () const
 Gets current position.
void next ()
 Move to the next item in the list.
void skip_to (Xapian::termpos termpos)
 Move to the next item in the list.
bool at_end () const
 True if we're off the end of the list.

Private Member Functions

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

Private Attributes

vector< Xapian::termpospositions
 The list of positions.
vector< Xapian::termpos
>::const_iterator 
mypos
 Position of iteration through positions.
bool iterating_in_progress
 True if we have started iterating.

Detailed Description

A position list in a inemory database.

Definition at line 38 of file inmemory_positionlist.h.


Constructor & Destructor Documentation

InMemoryPositionList::InMemoryPositionList ( const InMemoryPositionList  )  [private]

Copying is not allowed.

InMemoryPositionList::InMemoryPositionList (  )  [inline]

Default constructor.

Definition at line 58 of file inmemory_positionlist.h.

InMemoryPositionList::InMemoryPositionList ( const OmDocumentTerm::term_positions positions_  ) 

Construct, fill list with data, and move the position to the start.

Definition at line 28 of file inmemory_positionlist.cc.

InMemoryPositionList::~InMemoryPositionList (  )  [inline]

Destructor.

Definition at line 64 of file inmemory_positionlist.h.


Member Function Documentation

void InMemoryPositionList::operator= ( const InMemoryPositionList  )  [private]

Assignment is not allowed.

void InMemoryPositionList::set_data ( const OmDocumentTerm::term_positions positions_  ) 

Fill list with data, and move the position to the start.

Definition at line 35 of file inmemory_positionlist.cc.

References iterating_in_progress, mypos, and positions.

Referenced by InMemoryPostList::read_position_list().

Xapian::termcount InMemoryPositionList::get_size (  )  const [virtual]

Gets size of position list.

Implements Xapian::PositionIterator::Internal.

Definition at line 43 of file inmemory_positionlist.cc.

References positions.

Xapian::termpos InMemoryPositionList::get_position (  )  const [virtual]

Gets current position.

Implements Xapian::PositionIterator::Internal.

Definition at line 49 of file inmemory_positionlist.cc.

References Assert, at_end(), iterating_in_progress, and mypos.

void InMemoryPositionList::next (  )  [virtual]

Move to the next item in the list.

Either next() or skip_to() must be called before any other methods.

Implements Xapian::PositionIterator::Internal.

Definition at line 57 of file inmemory_positionlist.cc.

References Assert, at_end(), iterating_in_progress, and mypos.

void InMemoryPositionList::skip_to ( Xapian::termpos  termpos  )  [virtual]

Move to the next item in the list.

Either next() or skip_to() must be called before any other methods.

Implements Xapian::PositionIterator::Internal.

Definition at line 68 of file inmemory_positionlist.cc.

References at_end(), iterating_in_progress, and mypos.

bool InMemoryPositionList::at_end (  )  const [virtual]

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

Implements Xapian::PositionIterator::Internal.

Definition at line 75 of file inmemory_positionlist.cc.

References mypos, and positions.

Referenced by get_position(), next(), and skip_to().


Member Data Documentation

vector<Xapian::termpos> InMemoryPositionList::positions [private]

The list of positions.

Definition at line 42 of file inmemory_positionlist.h.

Referenced by at_end(), get_size(), and set_data().

vector<Xapian::termpos>::const_iterator InMemoryPositionList::mypos [private]

Position of iteration through positions.

Definition at line 45 of file inmemory_positionlist.h.

Referenced by at_end(), get_position(), next(), set_data(), and skip_to().

bool InMemoryPositionList::iterating_in_progress [private]

True if we have started iterating.

Definition at line 48 of file inmemory_positionlist.h.

Referenced by get_position(), next(), set_data(), and skip_to().


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