BrassSpellingTermList Class Reference

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

#include <brass_spelling.h>

Inheritance diagram for BrassSpellingTermList:

Inheritance graph
[legend]
Collaboration diagram for BrassSpellingTermList:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 BrassSpellingTermList (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

 BrassSpellingTermList (const BrassSpellingTermList &)
 Copying is not allowed.
void operator= (const BrassSpellingTermList &)
 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 126 of file brass_spelling.h.


Constructor & Destructor Documentation

BrassSpellingTermList::BrassSpellingTermList ( const BrassSpellingTermList  )  [private]

Copying is not allowed.

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

Constructor.

Definition at line 144 of file brass_spelling.h.


Member Function Documentation

bool BrassSpellingTermList::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 462 of file brass_spelling.cc.

References data.

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

Return approximate size of this termlist.

Implements Xapian::TermIterator::Internal.

Definition at line 399 of file brass_spelling.cc.

References data.

Xapian::termcount BrassSpellingTermList::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 425 of file brass_spelling.cc.

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

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

Implements Xapian::TermIterator::Internal.

Definition at line 419 of file brass_spelling.cc.

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

Return the termname at the current position.

Implements Xapian::TermIterator::Internal.

Definition at line 407 of file brass_spelling.cc.

References current_term.

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

Return the wdf for the term at the current position.

Implements Xapian::TermIterator::Internal.

Definition at line 413 of file brass_spelling.cc.

TermList * BrassSpellingTermList::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 431 of file brass_spelling.cc.

References current_term, data, MAGIC_XOR_VALUE, and p.

Referenced by skip_to().

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

Assignment is not allowed.

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

Return a PositionIterator for the current position.

Implements Xapian::TermIterator::Internal.

Definition at line 474 of file brass_spelling.cc.

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

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

Implements Xapian::TermIterator::Internal.

Definition at line 468 of file brass_spelling.cc.

TermList * BrassSpellingTermList::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 453 of file brass_spelling.cc.

References current_term, data, and next().


Member Data Documentation

std::string BrassSpellingTermList::current_term [private]

The current term.

Definition at line 134 of file brass_spelling.h.

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

std::string BrassSpellingTermList::data [private]

The encoded data.

Definition at line 128 of file brass_spelling.h.

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

unsigned BrassSpellingTermList::p [private]

Position in the data.

Definition at line 131 of file brass_spelling.h.

Referenced by next().


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

Documentation for Xapian (version 1.2.13).
Generated on 9 Jan 2013 by Doxygen 1.5.9.