#include <flint_metadata.h>
Inheritance diagram for FlintMetadataTermList:
Public Member Functions | |
FlintMetadataTermList (Xapian::Internal::RefCntPtr< const Xapian::Database::Internal > database_, FlintCursor *cursor_, const std::string &prefix_) | |
~FlintMetadataTermList () | |
std::string | get_termname () const |
Returns the current termname. | |
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. | |
TermList * | next () |
Advance to the next term in the list. | |
TermList * | skip_to (const std::string &tname) |
Advance to the first term which is >= tname. | |
bool | at_end () const |
True if we're off the end of the list. | |
Private Member Functions | |
FlintMetadataTermList (const FlintMetadataTermList &) | |
Copying is not allowed. | |
void | operator= (const FlintMetadataTermList &) |
Assignment is not allowed. | |
Private Attributes | |
Xapian::Internal::RefCntPtr< const Xapian::Database::Internal > | database |
Keep a reference to our database to stop it being deleted. | |
FlintCursor * | cursor |
A cursor which runs through the postlist table reading metadata keys. | |
std::string | prefix |
The prefix that all returned keys must have. |
Definition at line 38 of file flint_metadata.h.
FlintMetadataTermList::FlintMetadataTermList | ( | const FlintMetadataTermList & | ) | [private] |
Copying is not allowed.
FlintMetadataTermList::FlintMetadataTermList | ( | Xapian::Internal::RefCntPtr< const Xapian::Database::Internal > | database_, | |
FlintCursor * | cursor_, | |||
const std::string & | prefix_ | |||
) |
FlintMetadataTermList::~FlintMetadataTermList | ( | ) |
void FlintMetadataTermList::operator= | ( | const FlintMetadataTermList & | ) | [private] |
Assignment is not allowed.
string FlintMetadataTermList::get_termname | ( | ) | const [virtual] |
Returns the current termname.
Either next() or skip_to() must have been called before this method can be called.
Implements AllTermsList.
Definition at line 50 of file flint_metadata.cc.
References Assert, at_end(), FlintCursor::current_key, cursor, DEBUGCALL, prefix, RETURN, and startswith().
Xapian::doccount FlintMetadataTermList::get_termfreq | ( | ) | const [virtual] |
Return the term frequency for the term at the current position.
Not meaningful for a FlintMetadataTermList.
Implements AllTermsList.
Definition at line 60 of file flint_metadata.cc.
Xapian::termcount FlintMetadataTermList::get_collection_freq | ( | ) | const [virtual] |
Return the collection frequency for the term at the current position.
Not meaningful for a FlintMetadataTermList.
Implements AllTermsList.
Definition at line 66 of file flint_metadata.cc.
TermList * FlintMetadataTermList::next | ( | ) | [virtual] |
Advance to the next term in the list.
Implements AllTermsList.
Definition at line 72 of file flint_metadata.cc.
References FlintCursor::after_end(), Assert, at_end(), FlintCursor::current_key, cursor, DEBUGCALL, FlintCursor::next(), prefix, RETURN, startswith(), and FlintCursor::to_end().
TermList* FlintMetadataTermList::skip_to | ( | const std::string & | tname | ) | [virtual] |
bool FlintMetadataTermList::at_end | ( | ) | const [virtual] |
True if we're off the end of the list.
Implements AllTermsList.
Definition at line 104 of file flint_metadata.cc.
References FlintCursor::after_end(), cursor, DEBUGCALL, and RETURN.
Referenced by get_termname(), and next().
Xapian::Internal::RefCntPtr<const Xapian::Database::Internal> FlintMetadataTermList::database [private] |
Keep a reference to our database to stop it being deleted.
Definition at line 46 of file flint_metadata.h.
FlintCursor* FlintMetadataTermList::cursor [private] |
A cursor which runs through the postlist table reading metadata keys.
Definition at line 50 of file flint_metadata.h.
Referenced by at_end(), get_termname(), next(), and ~FlintMetadataTermList().
std::string FlintMetadataTermList::prefix [private] |
The prefix that all returned keys must have.
Definition at line 54 of file flint_metadata.h.
Referenced by get_termname(), and next().