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.
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 73 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 94 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 97 of file flint_positionlist.h.

References read_data().


Member Function Documentation

bool FlintPositionList::at_end (  )  const [virtual]

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

Implements Xapian::PositionIterator::Internal.

Definition at line 181 of file flint_positionlist.cc.

References current_pos, LOGCALL, positions, and RETURN.

Referenced by next(), and skip_to().

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 150 of file flint_positionlist.cc.

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

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

Returns size of position list.

Implements Xapian::PositionIterator::Internal.

Definition at line 143 of file flint_positionlist.cc.

References LOGCALL, positions, and RETURN.

void FlintPositionList::next (  )  [virtual]

Advance to the next term position in the list.

Implements Xapian::PositionIterator::Internal.

Definition at line 158 of file flint_positionlist.cc.

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

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 102 of file flint_positionlist.cc.

References current_pos, F_pack_uint_preserving_sort(), F_unpack_uint(), FlintTable::get_exact_entry(), have_started, LOGCALL_VOID, and positions.

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

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 171 of file flint_positionlist.cc.

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


Member Data Documentation

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

Position of iteration through data.

Definition at line 78 of file flint_positionlist.h.

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

Have we started iterating yet?

Definition at line 81 of file flint_positionlist.h.

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

Vector of term positions.

Definition at line 75 of file flint_positionlist.h.

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


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

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