xapian-core  1.4.25
Public Member Functions | Private Member Functions | Private Attributes | List of all members
InMemoryPositionList Class Reference

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

#include <inmemory_positionlist.h>

+ Inheritance diagram for InMemoryPositionList:
+ Collaboration diagram for InMemoryPositionList:

Public Member Functions

 InMemoryPositionList ()
 Default constructor. More...
 
 InMemoryPositionList (bool)
 Construct an empty InMemoryPositionList. More...
 
 InMemoryPositionList (const OmDocumentTerm::term_positions &positions_)
 Construct, fill list with data, and move the position to the start. More...
 
void set_data (const OmDocumentTerm::term_positions &positions_)
 Fill list with data, and move the position to the start. More...
 
Xapian::termcount get_approx_size () const
 Gets size of position list. More...
 
Xapian::termpos get_position () const
 Gets current position. More...
 
bool next ()
 Move to the next item in the list. More...
 
bool skip_to (Xapian::termpos termpos)
 Move to the next item in the list. 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

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

Private Attributes

vector< Xapian::termpospositions
 The list of positions. More...
 
vector< Xapian::termpos >::const_iterator mypos
 Position of iteration through positions. More...
 
bool iterating_in_progress
 True if we have started iterating. 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 inmemory database.

Definition at line 36 of file inmemory_positionlist.h.

Constructor & Destructor Documentation

◆ InMemoryPositionList() [1/4]

InMemoryPositionList::InMemoryPositionList ( const InMemoryPositionList )
private

Copying is not allowed.

◆ InMemoryPositionList() [2/4]

InMemoryPositionList::InMemoryPositionList ( )
inline

Default constructor.

Definition at line 56 of file inmemory_positionlist.h.

◆ InMemoryPositionList() [3/4]

InMemoryPositionList::InMemoryPositionList ( bool  )
inlineexplicit

Construct an empty InMemoryPositionList.

Definition at line 59 of file inmemory_positionlist.h.

◆ InMemoryPositionList() [4/4]

InMemoryPositionList::InMemoryPositionList ( const OmDocumentTerm::term_positions positions_)
explicit

Construct, fill list with data, and move the position to the start.

Definition at line 30 of file inmemory_positionlist.cc.

Member Function Documentation

◆ get_approx_size()

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

Gets size of position list.

Implements Xapian::PositionIterator::Internal.

Definition at line 45 of file inmemory_positionlist.cc.

References positions.

◆ get_position()

Xapian::termpos InMemoryPositionList::get_position ( ) const
virtual

Gets current position.

Implements Xapian::PositionIterator::Internal.

Definition at line 51 of file inmemory_positionlist.cc.

References Assert, iterating_in_progress, mypos, and positions.

◆ next()

bool InMemoryPositionList::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 59 of file inmemory_positionlist.cc.

References Assert, iterating_in_progress, mypos, and positions.

◆ operator=()

void InMemoryPositionList::operator= ( const InMemoryPositionList )
private

Assignment is not allowed.

◆ set_data()

void InMemoryPositionList::set_data ( const OmDocumentTerm::term_positions positions_)

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

Definition at line 37 of file inmemory_positionlist.cc.

References iterating_in_progress, mypos, and positions.

Referenced by InMemoryPostList::read_position_list().

◆ skip_to()

bool InMemoryPositionList::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 71 of file inmemory_positionlist.cc.

References iterating_in_progress, mypos, and positions.

Member Data Documentation

◆ iterating_in_progress

bool InMemoryPositionList::iterating_in_progress
private

True if we have started iterating.

Definition at line 46 of file inmemory_positionlist.h.

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

◆ mypos

vector<Xapian::termpos>::const_iterator InMemoryPositionList::mypos
private

Position of iteration through positions.

Definition at line 43 of file inmemory_positionlist.h.

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

◆ positions

vector<Xapian::termpos> InMemoryPositionList::positions
private

The list of positions.

Definition at line 40 of file inmemory_positionlist.h.

Referenced by get_approx_size(), get_position(), next(), set_data(), and skip_to().


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