FlintPositionList Class Reference

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

#include <flint_positionlist.h>

Inheritance diagram for FlintPositionList:

Inheritance graph
[legend]
Collaboration diagram for FlintPositionList:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 FlintPositionList ()
 Default constructor.
 FlintPositionList (const FlintTable *table, Xapian::docid did, const string &tname)
 Construct and initialise with data.
 ~FlintPositionList ()
 Destructor.
bool read_data (const FlintTable *table, Xapian::docid did, const string &tname)
 Fill list with data, and move the position to the start.
Xapian::termcount get_size () const
 Returns size of position list.
Xapian::termpos get_position () const
 Returns current position.
void next ()
 Advance to the next term position in the list.
void skip_to (Xapian::termpos termpos)
 Advance to the first term position which is at least termpos.
bool at_end () const
 True if we're off the end of the list.

Private Member Functions

void next_internal ()
 Advance to next term position.
 FlintPositionList (const FlintPositionList &)
 Copying is not allowed.
void operator= (const FlintPositionList &)
 Assignment is not allowed.

Private Attributes

vector< Xapian::termpospositions
 Vector of term positions.
vector< Xapian::termpos
>::const_iterator 
current_pos
 Position of iteration through data.
bool have_started
 Have we started iterating yet?

Detailed Description

A position list in a flint database.

Definition at line 68 of file flint_positionlist.h.


Constructor & Destructor Documentation

FlintPositionList::FlintPositionList ( const FlintPositionList  )  [private]

Copying is not allowed.

FlintPositionList::FlintPositionList (  )  [inline]

Default constructor.

Definition at line 89 of file flint_positionlist.h.

FlintPositionList::FlintPositionList ( const FlintTable table,
Xapian::docid  did,
const string &  tname 
) [inline]

Construct and initialise with data.

Definition at line 92 of file flint_positionlist.h.

References read_data().

FlintPositionList::~FlintPositionList (  )  [inline]

Destructor.

Definition at line 98 of file flint_positionlist.h.


Member Function Documentation

void FlintPositionList::next_internal (  )  [private]

Advance to next term position.

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

Assignment is not allowed.

bool FlintPositionList::read_data ( const FlintTable table,
Xapian::docid  did,
const string &  tname 
)

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

Returns:
true if position data was read.

Definition at line 282 of file flint_positionlist.cc.

References current_pos, DEBUGCALL, Xapian::BitReader::decode(), Xapian::BitReader::decode_interpolative(), FlintTable::get_exact_entry(), have_started, pack_uint_preserving_sort(), positions, Xapian::BitReader::read_bits(), and unpack_uint().

Referenced by FlintPositionList(), and FlintPostList::read_position_list().

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

Returns size of position list.

Implements Xapian::PositionIterator::Internal.

Definition at line 325 of file flint_positionlist.cc.

References DEBUGCALL, positions, and RETURN.

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

Returns current position.

Either next() or skip_to() must have been called before this method can be called.

Implements Xapian::PositionIterator::Internal.

Definition at line 332 of file flint_positionlist.cc.

References Assert, current_pos, DEBUGCALL, have_started, and RETURN.

void FlintPositionList::next (  )  [virtual]

Advance to the next term position in the list.

Implements Xapian::PositionIterator::Internal.

Definition at line 340 of file flint_positionlist.cc.

References Assert, at_end(), current_pos, DEBUGCALL, and have_started.

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

Advance to the first term position which is at least termpos.

Implements Xapian::PositionIterator::Internal.

Definition at line 353 of file flint_positionlist.cc.

References at_end(), current_pos, DEBUGCALL, and have_started.

bool FlintPositionList::at_end (  )  const [virtual]

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

Implements Xapian::PositionIterator::Internal.

Definition at line 363 of file flint_positionlist.cc.

References current_pos, DEBUGCALL, positions, and RETURN.

Referenced by next(), and skip_to().


Member Data Documentation

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

Vector of term positions.

Definition at line 70 of file flint_positionlist.h.

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

vector<Xapian::termpos>::const_iterator FlintPositionList::current_pos [private]

Position of iteration through data.

Definition at line 73 of file flint_positionlist.h.

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

bool FlintPositionList::have_started [private]

Have we started iterating yet?

Definition at line 76 of file flint_positionlist.h.

Referenced by get_position(), next(), read_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.