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

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

#include <glass_positionlist.h>

+ Inheritance diagram for GlassBasePositionList:
+ Collaboration diagram for GlassBasePositionList:

Public Member Functions

 GlassBasePositionList ()
 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 (std::string_view 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

 GlassBasePositionList (const GlassBasePositionList &)=delete
 Copying is not allowed. More...
 
GlassBasePositionListoperator= (const GlassBasePositionList &)=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 glass database.

Definition at line 35 of file glass_positionlist.h.

Constructor & Destructor Documentation

◆ GlassBasePositionList() [1/2]

GlassBasePositionList::GlassBasePositionList ( const GlassBasePositionList )
privatedelete

Copying is not allowed.

◆ GlassBasePositionList() [2/2]

GlassBasePositionList::GlassBasePositionList ( )
inline

Default constructor.

Definition at line 67 of file glass_positionlist.h.

Member Function Documentation

◆ back()

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

Return the final entry in this positionlist.

Implements Xapian::PositionIterator::Internal.

Definition at line 140 of file glass_positionlist.cc.

References LOGCALL, and RETURN.

◆ get_approx_size()

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

Returns size of position list.

Implements Xapian::PositionIterator::Internal.

Definition at line 133 of file glass_positionlist.cc.

References LOGCALL, and RETURN.

◆ get_position()

Xapian::termpos GlassBasePositionList::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 147 of file glass_positionlist.cc.

References Assert, LOGCALL, and RETURN.

◆ next()

bool GlassBasePositionList::next ( )
virtual

Advance to the next term position in the list.

Implements Xapian::PositionIterator::Internal.

Definition at line 155 of file glass_positionlist.cc.

References LOGCALL, and rare.

◆ operator=()

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

Assignment is not allowed.

◆ set_data()

void GlassBasePositionList::set_data ( std::string_view  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 95 of file glass_positionlist.cc.

References LOGCALL_VOID, pos, and unpack_uint().

◆ skip_to()

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

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

Implements Xapian::PositionIterator::Internal.

Definition at line 170 of file glass_positionlist.cc.

References LOGCALL.

Member Data Documentation

◆ current_pos

Xapian::termpos GlassBasePositionList::current_pos
protected

Current entry.

Definition at line 47 of file glass_positionlist.h.

◆ have_started

bool GlassBasePositionList::have_started
protected

Have we started iterating yet?

Definition at line 56 of file glass_positionlist.h.

◆ last

Xapian::termpos GlassBasePositionList::last
protected

Last entry.

Definition at line 50 of file glass_positionlist.h.

◆ rd

BitReader GlassBasePositionList::rd
protected

Interpolative decoder.

Definition at line 44 of file glass_positionlist.h.

◆ size

Xapian::termcount GlassBasePositionList::size
protected

Number of entries.

Definition at line 53 of file glass_positionlist.h.


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