xapian-core  2.0.0
Public Member Functions | Protected Member Functions | Private Member Functions | List of all members
AllTermsList Class Referenceabstract

Abstract base class for iterating all terms in a database. More...

#include <alltermslist.h>

+ Inheritance diagram for AllTermsList:
+ Collaboration diagram for AllTermsList:

Public Member Functions

virtual Xapian::termcount get_approx_size () const =0
 Return approximate size of this termlist. More...
 
virtual Xapian::termcount get_wdf () const
 Return the wdf for the term at the current position. More...
 
virtual Xapian::doccount get_termfreq () const =0
 Return the term frequency for the term at the current position. More...
 
virtual TermListnext ()=0
 Advance the current position to the next term in the termlist. More...
 
virtual TermListskip_to (std::string_view term)=0
 Skip forward to the specified term. More...
 
virtual Xapian::termcount positionlist_count () const
 Return true if the current position is past the last term in this list. More...
 
virtual PositionListpositionlist_begin () const
 Return a PositionIterator for the current position. More...
 
- Public Member Functions inherited from Xapian::TermIterator::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...
 
virtual void accumulate_stats (Xapian::Internal::ExpandStats &stats) const
 Collate weighting information for the current term. More...
 
const std::string & get_termname () const
 Return the termname at the current position. More...
 
virtual const Xapian::VecCOW< Xapian::termpos > * get_vec_termpos () const
 Get pointer to VecCOW<termpos> if that's the internal representation. More...
 
- Public Member Functions inherited from Xapian::Internal::intrusive_base
 intrusive_base ()
 Construct with no references. More...
 

Protected Member Functions

 AllTermsList ()
 Only constructable as a base class for derived classes. More...
 
- Protected Member Functions inherited from Xapian::TermIterator::Internal
 Internal ()
 Only constructable as a base class for derived classes. More...
 

Private Member Functions

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

Additional Inherited Members

- Public Attributes inherited from Xapian::TermIterator::Internal
size_t shard_index = 0
 Which shard of a multidatabase this is from. More...
 
- Public Attributes inherited from Xapian::Internal::intrusive_base
unsigned _refs
 Reference count. More...
 
- Protected Attributes inherited from Xapian::TermIterator::Internal
std::string current_term
 The current term. More...
 

Detailed Description

Abstract base class for iterating all terms in a database.

Definition at line 27 of file alltermslist.h.

Constructor & Destructor Documentation

◆ AllTermsList() [1/2]

AllTermsList::AllTermsList ( const AllTermsList )
private

Don't allow copying.

◆ AllTermsList() [2/2]

AllTermsList::AllTermsList ( )
inlineprotected

Only constructable as a base class for derived classes.

Definition at line 36 of file alltermslist.h.

Member Function Documentation

◆ get_approx_size()

virtual Xapian::termcount AllTermsList::get_approx_size ( ) const
pure virtual

◆ get_termfreq()

virtual Xapian::doccount AllTermsList::get_termfreq ( ) const
pure virtual

◆ get_wdf()

Xapian::termcount AllTermsList::get_wdf ( ) const
virtual

Return the wdf for the term at the current position.

This isn't meaningful for an AllTermsList, and will throw Xapian::InvalidOperationError if called.

Implements Xapian::TermIterator::Internal.

Definition at line 32 of file alltermslist.cc.

◆ next()

virtual TermList* AllTermsList::next ( )
pure virtual

◆ operator=()

void AllTermsList::operator= ( const AllTermsList )
private

Don't allow assignment.

◆ positionlist_begin()

PositionList * AllTermsList::positionlist_begin ( ) const
virtual

Return a PositionIterator for the current position.

This isn't meaningful for an AllTermsList, and will throw Xapian::InvalidOperationError if called.

Implements Xapian::TermIterator::Internal.

Definition at line 44 of file alltermslist.cc.

◆ positionlist_count()

Xapian::termcount AllTermsList::positionlist_count ( ) const
virtual

Return true if the current position is past the last term in this list.

This isn't meaningful for an AllTermsList, and will throw Xapian::InvalidOperationError if called.

Implements Xapian::TermIterator::Internal.

Definition at line 38 of file alltermslist.cc.

◆ skip_to()

virtual TermList* AllTermsList::skip_to ( std::string_view  term)
pure virtual

Skip forward to the specified term.

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

Returns
Normally returns NULL to indicate success. If the end has been reached, returns this; if another non-NULL pointer is returned then the caller should substitute the returned pointer for its pointer to us, and then delete us. This "pruning" can only happen for a non-leaf subclass of this class.

Implements Xapian::TermIterator::Internal.

Implemented in InMemoryAllTermsList, GlassSynonymTermList, GlassSpellingWordsList, GlassAllTermsList, RemoteKeyList, RemoteAllTermsList, MultiAllTermsList, HoneySynonymTermList, HoneySpellingWordsList, HoneyAllTermsList, HoneyMetadataTermList, and GlassMetadataTermList.


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