FlintSpellingTermList Class Reference

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

#include <flint_spelling.h>

Inheritance diagram for FlintSpellingTermList:

Inheritance graph
[legend]
Collaboration diagram for FlintSpellingTermList:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 FlintSpellingTermList (const std::string &data_)
 Constructor.
Xapian::termcount get_approx_size () const
 Return approximate size of this termlist.
std::string get_termname () const
 Return the termname at the current position.
Xapian::termcount get_wdf () const
 Return the wdf for the term at the current position.
Xapian::doccount get_termfreq () const
 Return the term frequency for the term at the current position.
Xapian::termcount get_collection_freq () const
 Return the collection frequency for the term at the current position.
TermListnext ()
 Advance the current position to the next term in the termlist.
TermListskip_to (const std::string &term)
 Skip forward to the specified term.
bool at_end () const
 Return true if the current position is past the last term in this list.
Xapian::termcount positionlist_count () const
 Return the length of the position list for the current position.
Xapian::PositionIterator positionlist_begin () const
 Return a PositionIterator for the current position.

Private Member Functions

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

Private Attributes

std::string data
 The encoded data.
unsigned p
 Position in the data.
std::string current_term
 The current term.


Detailed Description

The list of words containing a particular trigram.

Definition at line 128 of file flint_spelling.h.


Constructor & Destructor Documentation

FlintSpellingTermList::FlintSpellingTermList ( const FlintSpellingTermList  )  [private]

Copying is not allowed.

FlintSpellingTermList::FlintSpellingTermList ( const std::string &  data_  )  [inline]

Constructor.

Definition at line 146 of file flint_spelling.h.


Member Function Documentation

bool FlintSpellingTermList::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 459 of file flint_spelling.cc.

References data.

Xapian::termcount FlintSpellingTermList::get_approx_size (  )  const [virtual]

Return approximate size of this termlist.

Implements Xapian::TermIterator::Internal.

Definition at line 396 of file flint_spelling.cc.

References data.

Xapian::termcount FlintSpellingTermList::get_collection_freq (  )  const [virtual]

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

This method is only implemented for subclasses of AllTermsList (and isn't currently used).

Reimplemented from Xapian::TermIterator::Internal.

Definition at line 422 of file flint_spelling.cc.

Xapian::doccount FlintSpellingTermList::get_termfreq (  )  const [virtual]

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

Implements Xapian::TermIterator::Internal.

Definition at line 416 of file flint_spelling.cc.

std::string FlintSpellingTermList::get_termname (  )  const [virtual]

Return the termname at the current position.

Implements Xapian::TermIterator::Internal.

Definition at line 404 of file flint_spelling.cc.

References current_term.

Xapian::termcount FlintSpellingTermList::get_wdf (  )  const [virtual]

Return the wdf for the term at the current position.

Implements Xapian::TermIterator::Internal.

Definition at line 410 of file flint_spelling.cc.

TermList * FlintSpellingTermList::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() 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 428 of file flint_spelling.cc.

References current_term, data, MAGIC_XOR_VALUE, and p.

Referenced by skip_to().

void FlintSpellingTermList::operator= ( const FlintSpellingTermList  )  [private]

Assignment is not allowed.

Xapian::PositionIterator FlintSpellingTermList::positionlist_begin (  )  const [virtual]

Return a PositionIterator for the current position.

Implements Xapian::TermIterator::Internal.

Definition at line 471 of file flint_spelling.cc.

Xapian::termcount FlintSpellingTermList::positionlist_count (  )  const [virtual]

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

Implements Xapian::TermIterator::Internal.

Definition at line 465 of file flint_spelling.cc.

TermList * FlintSpellingTermList::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 450 of file flint_spelling.cc.

References current_term, data, and next().


Member Data Documentation

std::string FlintSpellingTermList::current_term [private]

The current term.

Definition at line 136 of file flint_spelling.h.

Referenced by get_termname(), next(), and skip_to().

std::string FlintSpellingTermList::data [private]

The encoded data.

Definition at line 130 of file flint_spelling.h.

Referenced by at_end(), get_approx_size(), next(), and skip_to().

unsigned FlintSpellingTermList::p [private]

Position in the data.

Definition at line 133 of file flint_spelling.h.

Referenced by next().


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

Documentation for Xapian (version 1.2.8).
Generated on 14 Dec 2011 by Doxygen 1.5.9.