MultiAllTermsList Class Reference

Class for merging AllTermsList objects from subdatabases. More...

#include <multialltermslist.h>

Inheritance diagram for MultiAllTermsList:

Inheritance graph
[legend]
Collaboration diagram for MultiAllTermsList:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 MultiAllTermsList (const std::vector< Xapian::Internal::RefCntPtr< Xapian::Database::Internal > > &dbs, const std::string &prefix)
 Constructor.
 ~MultiAllTermsList ()
 Destructor.
std::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.
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.

Private Member Functions

void operator= (const MultiAllTermsList &)
 Don't allow assignment.
 MultiAllTermsList (const MultiAllTermsList &)
 Don't allow copying.

Private Attributes

std::string current_term
 Current termname (or empty if we haven't started yet).
std::vector< TermList * > termlists
 Vector of sub-termlists which we use as a heap.

Detailed Description

Class for merging AllTermsList objects from subdatabases.

Definition at line 32 of file multialltermslist.h.


Constructor & Destructor Documentation

MultiAllTermsList::MultiAllTermsList ( const MultiAllTermsList  )  [private]

Don't allow copying.

MultiAllTermsList::MultiAllTermsList ( const std::vector< Xapian::Internal::RefCntPtr< Xapian::Database::Internal > > &  dbs,
const std::string &  prefix 
)

Constructor.

MultiAllTermsList::~MultiAllTermsList (  ) 

Destructor.

Definition at line 62 of file multi_alltermslist.cc.

References termlists.


Member Function Documentation

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

Don't allow assignment.

string MultiAllTermsList::get_termname (  )  const [virtual]

Return the termname at the current position.

Implements AllTermsList.

Definition at line 68 of file multi_alltermslist.cc.

References current_term.

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

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

Implements AllTermsList.

Definition at line 74 of file multi_alltermslist.cc.

References current_term, and termlists.

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

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

Implements AllTermsList.

Definition at line 87 of file multi_alltermslist.cc.

References current_term, and termlists.

TermList * MultiAllTermsList::next (  )  [virtual]

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

Implements AllTermsList.

Definition at line 100 of file multi_alltermslist.cc.

References current_term, and termlists.

TermList * MultiAllTermsList::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 term (or at_end() if no terms after term exist).

Implements AllTermsList.

Definition at line 147 of file multi_alltermslist.cc.

References current_term, and termlists.

bool MultiAllTermsList::at_end (  )  const [virtual]

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

Implements AllTermsList.

Definition at line 176 of file multi_alltermslist.cc.

References termlists.


Member Data Documentation

std::string MultiAllTermsList::current_term [private]

Current termname (or empty if we haven't started yet).

Definition at line 40 of file multialltermslist.h.

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

std::vector<TermList *> MultiAllTermsList::termlists [private]

Vector of sub-termlists which we use as a heap.

Definition at line 43 of file multialltermslist.h.

Referenced by at_end(), get_collection_freq(), get_termfreq(), next(), skip_to(), and ~MultiAllTermsList().


The documentation for this class was generated from the following files:
Documentation for Xapian (version 1.0.10).
Generated on 24 Dec 2008 by Doxygen 1.5.2.