xapian-core  1.4.27
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
 Return approximate size of this termlist. More...
 
virtual std::string get_termname () const =0
 Return the termname at the current position. 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 (const std::string &term)=0
 Skip forward to the specified term. More...
 
virtual bool at_end () const =0
 Return true if the current position is past the last term in this list. More...
 
virtual Xapian::termcount positionlist_count () const
 Return true if the current position is past the last term in this list. More...
 
virtual Xapian::PositionIterator positionlist_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...
 
virtual const std::vector< Xapian::termpos > * get_vector_termpos () const
 Get pointer to vector<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...
 

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.

References at_end(), get_approx_size(), get_termfreq(), get_termname(), get_wdf(), next(), positionlist_begin(), positionlist_count(), and skip_to().

Member Function Documentation

◆ at_end()

virtual bool AllTermsList::at_end ( ) const
pure virtual

◆ get_approx_size()

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

Return approximate size of this termlist.

Implements Xapian::TermIterator::Internal.

Definition at line 32 of file alltermslist.cc.

References Assert.

Referenced by AllTermsList().

◆ get_termfreq()

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

◆ get_termname()

virtual std::string AllTermsList::get_termname ( ) 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 40 of file alltermslist.cc.

Referenced by AllTermsList().

◆ next()

virtual TermList* AllTermsList::next ( )
pure virtual

◆ operator=()

void AllTermsList::operator= ( const AllTermsList )
private

Don't allow assignment.

◆ positionlist_begin()

Xapian::PositionIterator 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 52 of file alltermslist.cc.

Referenced by AllTermsList().

◆ 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 46 of file alltermslist.cc.

Referenced by AllTermsList().

◆ skip_to()

virtual TermList* AllTermsList::skip_to ( const std::string &  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 (or at_end() if no terms after term exist).

Implements Xapian::TermIterator::Internal.

Implemented in GlassSynonymTermList, ChertSynonymTermList, ChertAllTermsList, GlassAllTermsList, ChertSpellingWordsList, GlassSpellingWordsList, ChertMetadataTermList, GlassMetadataTermList, MultiAllTermsList, and InMemoryAllTermsList.

Referenced by AllTermsList().


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