QuartzPositionList Class Reference

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

#include <quartz_positionlist.h>

Inheritance diagram for QuartzPositionList:

Inheritance graph
[legend]
Collaboration diagram for QuartzPositionList:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 QuartzPositionList ()
 Default constructor.
 ~QuartzPositionList ()
 Destructor.
void read_data (const Btree *table, Xapian::docid did, const string &tname)
 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.
Xapian::termpos get_current_pos ()
 Return the current position.

Private Member Functions

 QuartzPositionList (const QuartzPositionList &)
 Copying is not allowed.
void operator= (const QuartzPositionList &)
 Assignment is not allowed.
void next_internal ()
 Advance position by one.

Private Attributes

string data
 The data.
const char * pos
 Position of iteration through data.
const char * end
 Byte after end of data.
bool is_at_end
 Whether we've run off the end of the list yet.
bool have_started
 Whether we've started iterating yet.
Xapian::termpos current_pos
 The current position.
Xapian::termcount number_of_entries
 The number of entries in the position list.

Detailed Description

A position list in a quartz database.

Definition at line 67 of file quartz_positionlist.h.


Constructor & Destructor Documentation

QuartzPositionList::QuartzPositionList ( const QuartzPositionList  )  [private]

Copying is not allowed.

QuartzPositionList::QuartzPositionList (  )  [inline]

Default constructor.

Definition at line 103 of file quartz_positionlist.h.

QuartzPositionList::~QuartzPositionList (  )  [inline]

Destructor.

Definition at line 106 of file quartz_positionlist.h.


Member Function Documentation

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

Assignment is not allowed.

void QuartzPositionList::next_internal (  )  [private]

Advance position by one.

Definition at line 85 of file quartz_positionlist.cc.

References Assert, current_pos, DEBUGCALL, end, is_at_end, pos, and unpack_uint().

Referenced by next(), and skip_to().

void QuartzPositionList::read_data ( const Btree table,
Xapian::docid  did,
const string &  tname 
)

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

Definition at line 40 of file quartz_positionlist.cc.

References current_pos, data, DEBUGCALL, end, Btree::get_exact_entry(), have_started, is_at_end, make_key(), number_of_entries, pos, and unpack_uint().

Referenced by QuartzPostList::read_position_list().

Xapian::termcount QuartzPositionList::get_size (  )  const [inline, virtual]

Gets size of position list.

Implements Xapian::PositionIterator::Internal.

Definition at line 114 of file quartz_positionlist.h.

References DEBUGCALL, number_of_entries, and RETURN.

Xapian::termpos QuartzPositionList::get_position (  )  const [inline, virtual]

Gets current position.

Implements Xapian::PositionIterator::Internal.

Definition at line 120 of file quartz_positionlist.h.

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

void QuartzPositionList::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 109 of file quartz_positionlist.cc.

References Assert, current_pos, DEBUGCALL, DEBUGLINE, have_started, is_at_end, next_internal(), and om_tostring().

void QuartzPositionList::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 121 of file quartz_positionlist.cc.

References current_pos, DEBUGCALL, DEBUGLINE, have_started, is_at_end, next_internal(), and om_tostring().

bool QuartzPositionList::at_end (  )  const [inline, virtual]

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

Implements Xapian::PositionIterator::Internal.

Definition at line 139 of file quartz_positionlist.h.

References DEBUGCALL, is_at_end, and RETURN.

Xapian::termpos QuartzPositionList::get_current_pos (  )  [inline]

Return the current position.

Definition at line 145 of file quartz_positionlist.h.

References current_pos.


Member Data Documentation

string QuartzPositionList::data [private]

The data.

Definition at line 70 of file quartz_positionlist.h.

Referenced by read_data().

const char* QuartzPositionList::pos [private]

Position of iteration through data.

Definition at line 74 of file quartz_positionlist.h.

Referenced by next_internal(), and read_data().

const char* QuartzPositionList::end [private]

Byte after end of data.

Definition at line 78 of file quartz_positionlist.h.

Referenced by next_internal(), and read_data().

bool QuartzPositionList::is_at_end [private]

Whether we've run off the end of the list yet.

Definition at line 81 of file quartz_positionlist.h.

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

bool QuartzPositionList::have_started [private]

Whether we've started iterating yet.

Definition at line 84 of file quartz_positionlist.h.

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

Xapian::termpos QuartzPositionList::current_pos [private]

The current position.

Definition at line 87 of file quartz_positionlist.h.

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

Xapian::termcount QuartzPositionList::number_of_entries [private]

The number of entries in the position list.

Definition at line 90 of file quartz_positionlist.h.

Referenced by get_size(), and read_data().


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.