xapian-core  2.0.0
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
HoneyBasePositionList Class Reference

Base-class for a position list in a honey database. More...

#include <honey_positionlist.h>

+ Inheritance diagram for HoneyBasePositionList:
+ Collaboration diagram for HoneyBasePositionList:

Public Member Functions

 HoneyBasePositionList ()
 Default constructor. More...
 
Xapian::termcount get_approx_size () const
 Returns size of position list. More...
 
Xapian::termpos back () const
 Return the final entry in this positionlist. 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...
 

Protected Member Functions

void set_data (const std::string &data)
 Set positional data and start to decode it. More...
 
- Protected Member Functions inherited from Xapian::PositionIterator::Internal
 Internal ()
 Only constructable as a base class for derived classes. More...
 

Protected 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...
 

Private Member Functions

 HoneyBasePositionList (const HoneyBasePositionList &)=delete
 Copying is not allowed. More...
 
HoneyBasePositionListoperator= (const HoneyBasePositionList &)=delete
 Assignment is not allowed. More...
 

Additional Inherited Members

- Public Attributes inherited from Xapian::Internal::intrusive_base
unsigned _refs
 Reference count. More...
 

Detailed Description

Base-class for a position list in a honey database.

Definition at line 36 of file honey_positionlist.h.

Constructor & Destructor Documentation

◆ HoneyBasePositionList() [1/2]

HoneyBasePositionList::HoneyBasePositionList ( const HoneyBasePositionList )
privatedelete

Copying is not allowed.

◆ HoneyBasePositionList() [2/2]

HoneyBasePositionList::HoneyBasePositionList ( )
inline

Default constructor.

Definition at line 68 of file honey_positionlist.h.

Member Function Documentation

◆ back()

Xapian::termpos HoneyBasePositionList::back ( ) const
virtual

Return the final entry in this positionlist.

Implements Xapian::PositionIterator::Internal.

Definition at line 131 of file honey_positionlist.cc.

References LOGCALL, and RETURN.

◆ get_approx_size()

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

Returns size of position list.

Implements Xapian::PositionIterator::Internal.

Definition at line 124 of file honey_positionlist.cc.

References LOGCALL, and RETURN.

◆ get_position()

Xapian::termpos HoneyBasePositionList::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 138 of file honey_positionlist.cc.

References Assert, LOGCALL, and RETURN.

◆ next()

bool HoneyBasePositionList::next ( )
virtual

Advance to the next term position in the list.

Implements Xapian::PositionIterator::Internal.

Definition at line 146 of file honey_positionlist.cc.

References LOGCALL, and rare.

◆ operator=()

HoneyBasePositionList& HoneyBasePositionList::operator= ( const HoneyBasePositionList )
privatedelete

Assignment is not allowed.

◆ set_data()

void HoneyBasePositionList::set_data ( const std::string &  data)
protected

Set positional data and start to decode it.

Parameters
dataThe positional data. Must stay valid while this object is using it.

Definition at line 86 of file honey_positionlist.cc.

References LOGCALL_VOID, pos, and unpack_uint().

◆ skip_to()

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

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

Implements Xapian::PositionIterator::Internal.

Definition at line 161 of file honey_positionlist.cc.

References LOGCALL.

Member Data Documentation

◆ current_pos

Xapian::termpos HoneyBasePositionList::current_pos
protected

Current entry.

Definition at line 48 of file honey_positionlist.h.

◆ have_started

bool HoneyBasePositionList::have_started
protected

Have we started iterating yet?

Definition at line 57 of file honey_positionlist.h.

◆ last

Xapian::termpos HoneyBasePositionList::last
protected

Last entry.

Definition at line 51 of file honey_positionlist.h.

◆ rd

BitReader HoneyBasePositionList::rd
protected

Interpolative decoder.

Definition at line 45 of file honey_positionlist.h.

◆ size

Xapian::termcount HoneyBasePositionList::size
protected

Number of entries.

Definition at line 54 of file honey_positionlist.h.


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