#include <flint_spellingwordslist.h>


Public Member Functions | |
| FlintSpellingWordsList (Xapian::Internal::RefCntPtr< const Xapian::Database::Internal > database_, FlintCursor *cursor_) | |
| ~FlintSpellingWordsList () | |
| Destructor. | |
| std::string | get_termname () const |
| Returns the current termname. | |
| Xapian::doccount | get_termfreq () const |
| Returns the term frequency of the current term. | |
| Xapian::termcount | get_collection_freq () const |
| Returns the collection frequency of the current term. | |
| 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 | |
| FlintSpellingWordsList (const FlintSpellingWordsList &) | |
| Copying is not allowed. | |
| void | operator= (const FlintSpellingWordsList &) |
| Assignment is not allowed. | |
| void | read_termfreq () const |
| Read and cache the term frequency. | |
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 spelling table reading termnames from the keys. | |
| Xapian::termcount | termfreq |
| The term frequency of the term at the current position. | |
Definition at line 30 of file flint_spellingwordslist.h.
| FlintSpellingWordsList::FlintSpellingWordsList | ( | const FlintSpellingWordsList & | ) | [private] |
Copying is not allowed.
| FlintSpellingWordsList::FlintSpellingWordsList | ( | Xapian::Internal::RefCntPtr< const Xapian::Database::Internal > | database_, | |
| FlintCursor * | cursor_ | |||
| ) | [inline] |
Definition at line 57 of file flint_spellingwordslist.h.
References cursor, and FlintCursor::find_entry().
| FlintSpellingWordsList::~FlintSpellingWordsList | ( | ) |
Destructor.
Definition at line 33 of file flint_spellingwordslist.cc.
References cursor, and LOGCALL_DTOR.
| bool FlintSpellingWordsList::at_end | ( | ) | const [virtual] |
True if we're off the end of the list.
Implements AllTermsList.
Definition at line 107 of file flint_spellingwordslist.cc.
References FlintCursor::after_end(), cursor, LOGCALL, and RETURN.
Referenced by get_termfreq(), get_termname(), next(), and skip_to().
| Xapian::termcount FlintSpellingWordsList::get_collection_freq | ( | ) | const [virtual] |
Returns the collection frequency of the current term.
Either next() or skip_to() must have been called before this method can be called.
Implements AllTermsList.
Definition at line 69 of file flint_spellingwordslist.cc.
| Xapian::doccount FlintSpellingWordsList::get_termfreq | ( | ) | const [virtual] |
Returns the term frequency of the current term.
Either next() or skip_to() must have been called before this method can be called.
Implements AllTermsList.
Definition at line 51 of file flint_spellingwordslist.cc.
References Assert, at_end(), FlintCursor::current_key, FlintCursor::current_tag, cursor, F_unpack_uint_last(), LOGCALL, and FlintCursor::read_tag().
| string FlintSpellingWordsList::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 40 of file flint_spellingwordslist.cc.
References Assert, at_end(), FlintCursor::current_key, cursor, LOGCALL, and RETURN.
| TermList * FlintSpellingWordsList::next | ( | ) | [virtual] |
Advance to the next term in the list.
Implements AllTermsList.
Definition at line 75 of file flint_spellingwordslist.cc.
References FlintCursor::after_end(), Assert, at_end(), FlintCursor::current_key, cursor, LOGCALL, FlintCursor::next(), RETURN, startswith(), and FlintCursor::to_end().
| void FlintSpellingWordsList::operator= | ( | const FlintSpellingWordsList & | ) | [private] |
Assignment is not allowed.
| void FlintSpellingWordsList::read_termfreq | ( | ) | const [private] |
Read and cache the term frequency.
| TermList * FlintSpellingWordsList::skip_to | ( | const std::string & | tname | ) | [virtual] |
Advance to the first term which is >= tname.
Implements AllTermsList.
Definition at line 90 of file flint_spellingwordslist.cc.
References FlintCursor::after_end(), Assert, at_end(), FlintCursor::current_key, cursor, FlintCursor::find_entry_ge(), LOGCALL, RETURN, startswith(), and FlintCursor::to_end().
FlintCursor* FlintSpellingWordsList::cursor [private] |
A cursor which runs through the spelling table reading termnames from the keys.
Definition at line 43 of file flint_spellingwordslist.h.
Referenced by at_end(), FlintSpellingWordsList(), get_termfreq(), get_termname(), next(), skip_to(), and ~FlintSpellingWordsList().
Xapian::Internal::RefCntPtr<const Xapian::Database::Internal> FlintSpellingWordsList::database [private] |
Keep a reference to our database to stop it being deleted.
Definition at line 38 of file flint_spellingwordslist.h.
Xapian::termcount FlintSpellingWordsList::termfreq [mutable, private] |
The term frequency of the term at the current position.
If this value is zero, then we haven't read the term frequency or collection frequency for the current term yet. We need to call read_termfreq() to read these.
Definition at line 51 of file flint_spellingwordslist.h.