xapian-core  1.4.26
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ChertSpellingTermList Class Reference

The list of words containing a particular trigram. More...

#include <chert_spelling.h>

+ Inheritance diagram for ChertSpellingTermList:
+ Collaboration diagram for ChertSpellingTermList:

Public Member Functions

 ChertSpellingTermList (const std::string &data_)
 Constructor. More...
 
Xapian::termcount get_approx_size () const
 Return approximate size of this termlist. More...
 
std::string get_termname () const
 Return the termname at the current position. More...
 
Xapian::termcount get_wdf () const
 Return the wdf for the term at the current position. More...
 
Xapian::doccount get_termfreq () const
 Return the term frequency for the term at the current position. More...
 
Xapian::termcount get_collection_freq () const
 
TermListnext ()
 Advance the current position to the next term in the termlist. More...
 
TermListskip_to (const std::string &term)
 Skip forward to the specified term. More...
 
bool at_end () const
 Return true if the current position is past the last term in this list. More...
 
Xapian::termcount positionlist_count () const
 Return the length of the position list for the current position. More...
 
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...
 

Private Member Functions

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

Private Attributes

std::string data
 The encoded data. More...
 
unsigned p
 Position in the data. More...
 
std::string current_term
 The current term. 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 Member Functions inherited from Xapian::TermIterator::Internal
 Internal ()
 Only constructable as a base class for derived classes. More...
 

Detailed Description

The list of words containing a particular trigram.

Definition at line 122 of file chert_spelling.h.

Constructor & Destructor Documentation

◆ ChertSpellingTermList() [1/2]

ChertSpellingTermList::ChertSpellingTermList ( const ChertSpellingTermList )
private

Copying is not allowed.

◆ ChertSpellingTermList() [2/2]

ChertSpellingTermList::ChertSpellingTermList ( const std::string &  data_)
inlineexplicit

Constructor.

Definition at line 140 of file chert_spelling.h.

Member Function Documentation

◆ at_end()

bool ChertSpellingTermList::at_end ( ) const
virtual

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

Implements Xapian::TermIterator::Internal.

Definition at line 454 of file chert_spelling.cc.

◆ get_approx_size()

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

Return approximate size of this termlist.

Implements Xapian::TermIterator::Internal.

Definition at line 397 of file chert_spelling.cc.

◆ get_collection_freq()

Xapian::termcount ChertSpellingTermList::get_collection_freq ( ) const

◆ get_termfreq()

Xapian::doccount ChertSpellingTermList::get_termfreq ( ) const
virtual

Return the term frequency for the term at the current position.

Implements Xapian::TermIterator::Internal.

Definition at line 417 of file chert_spelling.cc.

◆ get_termname()

std::string ChertSpellingTermList::get_termname ( ) const
virtual

Return the termname at the current position.

Implements Xapian::TermIterator::Internal.

Definition at line 405 of file chert_spelling.cc.

◆ get_wdf()

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

Return the wdf for the term at the current position.

Implements Xapian::TermIterator::Internal.

Definition at line 411 of file chert_spelling.cc.

◆ next()

TermList * ChertSpellingTermList::next ( )
virtual

Advance the current position to the next term in the termlist.

The list starts before the first term in the list, so next(), skip_to() or check() must be called before any methods which need the context of the current position.

Returns
If a 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.

Definition at line 423 of file chert_spelling.cc.

References MAGIC_XOR_VALUE.

Referenced by skip_to().

◆ operator=()

void ChertSpellingTermList::operator= ( const ChertSpellingTermList )
private

Assignment is not allowed.

◆ positionlist_begin()

Xapian::PositionIterator ChertSpellingTermList::positionlist_begin ( ) const
virtual

Return a PositionIterator for the current position.

Implements Xapian::TermIterator::Internal.

Definition at line 466 of file chert_spelling.cc.

◆ positionlist_count()

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

Return the length of the position list for the current position.

Implements Xapian::TermIterator::Internal.

Definition at line 460 of file chert_spelling.cc.

◆ skip_to()

TermList * ChertSpellingTermList::skip_to ( const std::string &  term)
virtual

Skip forward to the specified term.

If the specified term isn't in the list, position ourselves on the first term after tname (or at_end() if no terms after tname exist).

Implements Xapian::TermIterator::Internal.

Definition at line 445 of file chert_spelling.cc.

References next().

Member Data Documentation

◆ current_term

std::string ChertSpellingTermList::current_term
private

The current term.

Definition at line 130 of file chert_spelling.h.

◆ data

std::string ChertSpellingTermList::data
private

The encoded data.

Definition at line 124 of file chert_spelling.h.

◆ p

unsigned ChertSpellingTermList::p
private

Position in the data.

Definition at line 127 of file chert_spelling.h.


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