xapian-core  1.4.21
Public Member Functions | Private Attributes | List of all members
OrPositionList Class Reference

#include <orpositionlist.h>

+ Inheritance diagram for OrPositionList:
+ Collaboration diagram for OrPositionList:

Public Member Functions

 OrPositionList ()
 
PositionListgather (PostList *pl)
 
void add_poslist (PositionList *poslist)
 
Xapian::termcount get_approx_size () const
 Return approximate size of this positionlist. More...
 
Xapian::termpos get_position () const
 Return the current position. More...
 
bool next ()
 Advance to the next entry in the positionlist. More...
 
bool skip_to (Xapian::termpos termpos)
 Skip forward to the specified position. 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 Attributes

std::vector< PositionList * > pls
 The PositionList sub-objects. More...
 
std::vector< Xapian::termposcurrent
 Current positions of the subobjects. More...
 
Xapian::termpos current_pos
 Current position of this object. 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

Definition at line 31 of file orpositionlist.h.

Constructor & Destructor Documentation

◆ OrPositionList()

OrPositionList::OrPositionList ( )
inline

Definition at line 45 of file orpositionlist.h.

Member Function Documentation

◆ add_poslist()

void OrPositionList::add_poslist ( PositionList poslist)
inline

Definition at line 56 of file orpositionlist.h.

References get_approx_size(), get_position(), next(), and skip_to().

Referenced by LeafPostList::gather_position_lists().

◆ gather()

PositionList* OrPositionList::gather ( PostList pl)
inline

◆ get_approx_size()

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

Return approximate size of this positionlist.

Implements Xapian::PositionIterator::Internal.

Definition at line 30 of file orpositionlist.cc.

References LOGCALL, and RETURN.

Referenced by add_poslist().

◆ get_position()

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

Return the current position.

Implements Xapian::PositionIterator::Internal.

Definition at line 41 of file orpositionlist.cc.

References LOGCALL, and RETURN.

Referenced by add_poslist().

◆ next()

bool OrPositionList::next ( )
virtual

Advance to the next entry in the positionlist.

The list starts before the first entry, so next() or skip_to() must be called before get_position().

Returns
true if we're on a valid entry; false if we've reached the end of the list.

Implements Xapian::PositionIterator::Internal.

Definition at line 53 of file orpositionlist.cc.

References Xapian::PositionIterator::Internal::get_position(), LOGCALL, Xapian::PositionIterator::Internal::next(), and RETURN.

Referenced by add_poslist().

◆ skip_to()

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

Skip forward to the specified position.

If the specified position isn't in the list, position ourselves on the first entry after it.

Returns
true if we're on a valid entry; false if we've reached the end of the list.

Implements Xapian::PositionIterator::Internal.

Definition at line 85 of file orpositionlist.cc.

References Xapian::PositionIterator::Internal::get_position(), LOGCALL, RETURN, and Xapian::PositionIterator::Internal::skip_to().

Referenced by add_poslist().

Member Data Documentation

◆ current

std::vector<Xapian::termpos> OrPositionList::current
private

Current positions of the subobjects.

This will be empty when this position list hasn't yet started.

Definition at line 39 of file orpositionlist.h.

◆ current_pos

Xapian::termpos OrPositionList::current_pos
private

Current position of this object.

Definition at line 42 of file orpositionlist.h.

◆ pls

std::vector<PositionList*> OrPositionList::pls
private

The PositionList sub-objects.

Definition at line 33 of file orpositionlist.h.


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