VectorTermList Class Reference

#include <vectortermlist.h>

Inheritance diagram for VectorTermList:

Inheritance graph
[legend]
Collaboration diagram for VectorTermList:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 VectorTermList (vector< string >::const_iterator begin, vector< string >::const_iterator end)
 VectorTermList (list< string >::const_iterator begin, list< string >::const_iterator end)
Xapian::termcount get_approx_size () const
 Return approximate size of this termlist.
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.
TermListnext ()
 next() causes the TermList to move to the next term in the list.
TermListskip_to (const string &)
 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::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.

Private Attributes

vector< string > terms
vector< string >::size_type offset
bool before_start


Detailed Description

Definition at line 34 of file vectortermlist.h.


Constructor & Destructor Documentation

VectorTermList::VectorTermList ( vector< string >::const_iterator  begin,
vector< string >::const_iterator  end 
) [inline]

Definition at line 41 of file vectortermlist.h.

VectorTermList::VectorTermList ( list< string >::const_iterator  begin,
list< string >::const_iterator  end 
) [inline]

Definition at line 47 of file vectortermlist.h.


Member Function Documentation

bool VectorTermList::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 99 of file vectortermlist.h.

References before_start, offset, and terms.

Referenced by next(), and skip_to().

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

Return approximate size of this termlist.

Implements Xapian::TermIterator::Internal.

Definition at line 54 of file vectortermlist.h.

References terms.

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

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

Implements Xapian::TermIterator::Internal.

Definition at line 71 of file vectortermlist.h.

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

Return the termname at the current position.

Implements Xapian::TermIterator::Internal.

Definition at line 59 of file vectortermlist.h.

References Assert, before_start, offset, and terms.

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

Return the wdf for the term at the current position.

Implements Xapian::TermIterator::Internal.

Definition at line 65 of file vectortermlist.h.

References Assert, before_start, offset, and terms.

TermList* VectorTermList::next (  )  [inline, virtual]

next() causes the TermList to move to the next term in the list.

It must be called before any other methods. If next() returns a non-zero pointer P, then the original termlist should be deleted, and the original pointer replaced with P. In a leaf TermList, next() will always return 0.

Implements Xapian::TermIterator::Internal.

Definition at line 82 of file vectortermlist.h.

References Assert, at_end(), before_start, and offset.

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

Return a PositionIterator for the current position.

Implements Xapian::TermIterator::Internal.

Definition at line 103 of file vectortermlist.h.

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

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

Implements Xapian::TermIterator::Internal.

Definition at line 107 of file vectortermlist.h.

TermList* VectorTermList::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 91 of file vectortermlist.h.

References Assert, and at_end().


Member Data Documentation

Definition at line 38 of file vectortermlist.h.

Referenced by at_end(), get_termname(), get_wdf(), and next().

vector<string>::size_type VectorTermList::offset [private]

Definition at line 37 of file vectortermlist.h.

Referenced by at_end(), get_termname(), get_wdf(), and next().

vector<string> VectorTermList::terms [private]

Definition at line 36 of file vectortermlist.h.

Referenced by at_end(), get_approx_size(), get_termname(), and get_wdf().


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

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