xapian-core  1.4.26
Public Member Functions | Protected Member Functions | Private Member Functions | List of all members
Xapian::PositionIterator::Internal Class Referenceabstract

Abstract base class for iterating term positions in a document. More...

#include <positionlist.h>

+ Inheritance diagram for Xapian::PositionIterator::Internal:
+ Collaboration diagram for Xapian::PositionIterator::Internal:

Public Member Functions

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...
 
virtual Xapian::termcount get_approx_size () const =0
 Return approximate size of this positionlist. More...
 
virtual Xapian::termpos get_position () const =0
 Return the current position. More...
 
virtual bool next ()=0
 Advance to the next entry in the positionlist. More...
 
virtual bool skip_to (Xapian::termpos termpos)=0
 Skip forward to the specified position. More...
 
- Public Member Functions inherited from Xapian::Internal::intrusive_base
 intrusive_base ()
 Construct with no references. More...
 

Protected Member Functions

 Internal ()
 Only constructable as a base class for derived classes. More...
 

Private Member Functions

void operator= (const Internal &)=delete
 Don't allow assignment. More...
 
 Internal (const Internal &)=delete
 Don't allow copying. More...
 

Additional Inherited Members

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

Detailed Description

Abstract base class for iterating term positions in a document.

Definition at line 31 of file positionlist.h.

Constructor & Destructor Documentation

◆ Internal() [1/2]

Xapian::PositionIterator::Internal::Internal ( const Internal )
privatedelete

Don't allow copying.

◆ Internal() [2/2]

Xapian::PositionIterator::Internal::Internal ( )
inlineprotected

Only constructable as a base class for derived classes.

Definition at line 41 of file positionlist.h.

◆ ~Internal()

virtual Xapian::PositionIterator::Internal::~Internal ( )
inlinevirtual

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.

Definition at line 47 of file positionlist.h.

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

Member Function Documentation

◆ get_approx_size()

virtual Xapian::termcount Xapian::PositionIterator::Internal::get_approx_size ( ) const
pure virtual

Return approximate size of this positionlist.

Implemented in GlassPositionList, ChertPositionList, InMemoryPositionList, and OrPositionList.

Referenced by ~Internal().

◆ get_position()

virtual Xapian::termpos Xapian::PositionIterator::Internal::get_position ( ) const
pure virtual

◆ next()

virtual bool Xapian::PositionIterator::Internal::next ( )
pure 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.

Implemented in GlassPositionList, ChertPositionList, InMemoryPositionList, and OrPositionList.

Referenced by OrPositionList::next(), Xapian::PositionIterator::operator++(), Xapian::PositionIterator::PositionIterator(), NearPostList::test_doc(), and ~Internal().

◆ operator=()

void Xapian::PositionIterator::Internal::operator= ( const Internal )
privatedelete

Don't allow assignment.

◆ skip_to()

virtual bool Xapian::PositionIterator::Internal::skip_to ( Xapian::termpos  termpos)
pure 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.

Implemented in GlassPositionList, ChertPositionList, InMemoryPositionList, and OrPositionList.

Referenced by OrPositionList::skip_to(), Xapian::PositionIterator::skip_to(), NearPostList::test_doc(), and ~Internal().


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