xapian-core  1.4.27
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ChertPositionList Class Reference

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

#include <chert_positionlist.h>

+ Inheritance diagram for ChertPositionList:
+ Collaboration diagram for ChertPositionList:

Public Member Functions

 ChertPositionList ()
 Default constructor. More...
 
 ChertPositionList (const ChertTable *table, Xapian::docid did, const string &tname)
 Construct and initialise with data. More...
 
bool read_data (const ChertTable *table, Xapian::docid did, const string &tname)
 Fill list with data, and move the position to the start. More...
 
Xapian::termcount get_approx_size () const
 Returns size of position list. More...
 
Xapian::termpos get_position () const
 Returns current position. More...
 
bool next ()
 Advance to the next term position in the list. More...
 
bool skip_to (Xapian::termpos termpos)
 Advance to the first term position which is at least termpos. More...
 
- Public Member Functions inherited from Xapian::PositionIterator::Internal
virtual ~Internal ()
 We have virtual methods and want to be able to delete derived classes using a pointer to the base class, so we need a virtual destructor. More...
 
- Public Member Functions inherited from Xapian::Internal::intrusive_base
 intrusive_base ()
 Construct with no references. More...
 

Private Member Functions

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

Private Attributes

BitReader rd
 Interpolative decoder. More...
 
Xapian::termpos current_pos
 Current entry. More...
 
Xapian::termpos last
 Last entry. More...
 
Xapian::termcount size
 Number of entries. More...
 
bool have_started
 Have we started iterating yet? More...
 

Additional Inherited Members

- Public Attributes inherited from Xapian::Internal::intrusive_base
unsigned _refs
 Reference count. More...
 
- Protected Member Functions inherited from Xapian::PositionIterator::Internal
 Internal ()
 Only constructable as a base class for derived classes. More...
 

Detailed Description

A position list in a chert database.

Definition at line 78 of file chert_positionlist.h.

Constructor & Destructor Documentation

◆ ChertPositionList() [1/3]

ChertPositionList::ChertPositionList ( const ChertPositionList )
private

Copying is not allowed.

◆ ChertPositionList() [2/3]

ChertPositionList::ChertPositionList ( )
inline

Default constructor.

Definition at line 102 of file chert_positionlist.h.

◆ ChertPositionList() [3/3]

ChertPositionList::ChertPositionList ( const ChertTable table,
Xapian::docid  did,
const string &  tname 
)
inline

Construct and initialise with data.

Definition at line 105 of file chert_positionlist.h.

Member Function Documentation

◆ get_approx_size()

Xapian::termcount ChertPositionList::get_approx_size ( ) const
virtual

Returns size of position list.

Implements Xapian::PositionIterator::Internal.

Definition at line 142 of file chert_positionlist.cc.

References LOGCALL, and RETURN.

◆ get_position()

Xapian::termpos ChertPositionList::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 149 of file chert_positionlist.cc.

References Assert, LOGCALL, and RETURN.

◆ next()

bool ChertPositionList::next ( )
virtual

Advance to the next term position in the list.

Implements Xapian::PositionIterator::Internal.

Definition at line 157 of file chert_positionlist.cc.

References LOGCALL, and rare.

◆ operator=()

void ChertPositionList::operator= ( const ChertPositionList )
private

Assignment is not allowed.

◆ read_data()

bool ChertPositionList::read_data ( const ChertTable 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 chert_positionlist.cc.

References ChertTable::get_exact_entry(), LOGCALL, ChertPositionListTable::make_key(), RETURN, and unpack_uint().

Referenced by ChertPostList::read_position_list().

◆ skip_to()

bool ChertPositionList::skip_to ( Xapian::termpos  termpos)
virtual

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

Implements Xapian::PositionIterator::Internal.

Definition at line 172 of file chert_positionlist.cc.

References LOGCALL.

Member Data Documentation

◆ current_pos

Xapian::termpos ChertPositionList::current_pos
private

Current entry.

Definition at line 83 of file chert_positionlist.h.

◆ have_started

bool ChertPositionList::have_started
private

Have we started iterating yet?

Definition at line 92 of file chert_positionlist.h.

◆ last

Xapian::termpos ChertPositionList::last
private

Last entry.

Definition at line 86 of file chert_positionlist.h.

◆ rd

BitReader ChertPositionList::rd
private

Interpolative decoder.

Definition at line 80 of file chert_positionlist.h.

◆ size

Xapian::termcount ChertPositionList::size
private

Number of entries.

Definition at line 89 of file chert_positionlist.h.


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