StringAndFreqTermList Class Reference

A termlist iterator over a vector of StringAndFrequency objects. More...

Inheritance diagram for StringAndFreqTermList:

Inheritance graph
[legend]
Collaboration diagram for StringAndFreqTermList:

Collaboration graph
[legend]

List of all members.

Public Member Functions

void init ()
 init should be called after the values have been set, but before iteration begins.
string get_termname () const
 Return the termname at the current position.
Xapian::doccount get_termfreq () const
 Return the term frequency for the term at the current position.
TermListnext ()
 Advance the current position to the next term in the termlist.
TermListskip_to (const 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 get_approx_size () const
 Return approximate size of this termlist.
Xapian::termcount get_wdf () const
 Return the wdf for the term at the current position.
Xapian::PositionIterator positionlist_begin () const
 Return a PositionIterator for the current position.
Xapian::termcount positionlist_count () const
 Return the length of the position list for the current position.

Public Attributes

vector< StringAndFrequencyvalues

Private Attributes

vector< StringAndFrequency >
::const_iterator 
it
bool started


Detailed Description

A termlist iterator over a vector of StringAndFrequency objects.

Definition at line 187 of file matchspy.cc.


Member Function Documentation

bool StringAndFreqTermList::at_end (  )  const [inline, virtual]

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

Implements Xapian::TermIterator::Internal.

Definition at line 232 of file matchspy.cc.

References Assert.

Xapian::termcount StringAndFreqTermList::get_approx_size (  )  const [inline, virtual]

Return approximate size of this termlist.

Implements Xapian::TermIterator::Internal.

Definition at line 237 of file matchspy.cc.

References unsupported_method().

Xapian::doccount StringAndFreqTermList::get_termfreq (  )  const [inline, virtual]

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

Implements Xapian::TermIterator::Internal.

Definition at line 208 of file matchspy.cc.

References Assert.

string StringAndFreqTermList::get_termname (  )  const [inline, virtual]

Return the termname at the current position.

Implements Xapian::TermIterator::Internal.

Definition at line 202 of file matchspy.cc.

References Assert.

Xapian::termcount StringAndFreqTermList::get_wdf (  )  const [inline, virtual]

Return the wdf for the term at the current position.

Implements Xapian::TermIterator::Internal.

Definition at line 238 of file matchspy.cc.

References unsupported_method().

void StringAndFreqTermList::init (  )  [inline]

init should be called after the values have been set, but before iteration begins.

Definition at line 197 of file matchspy.cc.

TermList* StringAndFreqTermList::next (  )  [inline, 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 214 of file matchspy.cc.

References Assert.

Xapian::PositionIterator StringAndFreqTermList::positionlist_begin (  )  const [inline, virtual]

Return a PositionIterator for the current position.

Implements Xapian::TermIterator::Internal.

Definition at line 239 of file matchspy.cc.

References unsupported_method().

Xapian::termcount StringAndFreqTermList::positionlist_count (  )  const [inline, virtual]

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

Implements Xapian::TermIterator::Internal.

Definition at line 243 of file matchspy.cc.

References unsupported_method().

TermList* StringAndFreqTermList::skip_to ( const string &  term  )  [inline, 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 224 of file matchspy.cc.


Member Data Documentation

vector<StringAndFrequency>::const_iterator StringAndFreqTermList::it [private]

Definition at line 189 of file matchspy.cc.

Definition at line 190 of file matchspy.cc.

Definition at line 192 of file matchspy.cc.


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

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