#include <termiterator.h>

Classes | |
| class | Internal |
| Abstract base class for termlists. More... | |
Public Types | |
| typedef std::input_iterator_tag | iterator_category |
| Allow use as an STL iterator. | |
| typedef std::string | value_type |
| Allow use as an STL iterator. | |
| typedef Xapian::termcount_diff | difference_type |
| Allow use as an STL iterator. | |
| typedef std::string * | pointer |
| Allow use as an STL iterator. | |
| typedef std::string & | reference |
| Allow use as an STL iterator. | |
Public Member Functions | |
| TermIterator (Internal *internal_) | |
| TermIterator () | |
| Default constructor - for declaring an uninitialised iterator. | |
| ~TermIterator () | |
| Destructor. | |
| TermIterator (const TermIterator &other) | |
| Copying is allowed. | |
| void | operator= (const TermIterator &other) |
| Assignment is allowed. | |
| std::string | operator* () const |
| Return the current term. | |
| TermIterator & | operator++ () |
| Advance the iterator to the next position. | |
| DerefWrapper_< std::string > | operator++ (int) |
| Advance the iterator to the next position (postfix version). | |
| void | skip_to (const std::string &tname) |
| Advance the iterator to the specified term. | |
| Xapian::termcount | get_wdf () const |
| Return the wdf of the current term (if meaningful). | |
| Xapian::doccount | get_termfreq () const |
| Return the term frequency of the current term (if meaningful). | |
| Xapian::termcount | positionlist_count () const |
| Return length of positionlist for current term. | |
| PositionIterator | positionlist_begin () const |
| Return PositionIterator pointing to start of positionlist for current term. | |
| PositionIterator | positionlist_end () const |
| Return PositionIterator pointing to end of positionlist for current term. | |
| std::string | get_description () const |
| Return a string describing this object. | |
Public Attributes | |
| Xapian::Internal::RefCntPtr < Internal > | internal |
Definition at line 42 of file termiterator.h.
| typedef std::input_iterator_tag Xapian::TermIterator::iterator_category |
| typedef std::string* Xapian::TermIterator::pointer |
| typedef std::string& Xapian::TermIterator::reference |
| typedef std::string Xapian::TermIterator::value_type |
| Xapian::TermIterator::TermIterator | ( | Internal * | internal_ | ) | [explicit] |
For internal use only.
Reference counted internals.
Definition at line 40 of file omtermlistiterator.cc.
References handle_prune(), and internal.
| Xapian::TermIterator::TermIterator | ( | ) |
Default constructor - for declaring an uninitialised iterator.
Definition at line 50 of file omtermlistiterator.cc.
References LOGCALL_VOID.
| Xapian::TermIterator::~TermIterator | ( | ) |
| Xapian::TermIterator::TermIterator | ( | const TermIterator & | other | ) |
Copying is allowed.
The internals are reference counted, so copying is also cheap.
Definition at line 59 of file omtermlistiterator.cc.
References LOGCALL_VOID.
| std::string Xapian::TermIterator::get_description | ( | ) | const |
Return a string describing this object.
Definition at line 141 of file omtermlistiterator.cc.
Referenced by DEFINE_TESTCASE().
| Xapian::doccount Xapian::TermIterator::get_termfreq | ( | ) | const |
Return the term frequency of the current term (if meaningful).
The term frequency is the number of documents which a term indexes.
Definition at line 91 of file omtermlistiterator.cc.
References Assert, internal, LOGCALL, and RETURN.
Referenced by dbcheck(), DEFINE_TESTCASE(), and main().
| Xapian::termcount Xapian::TermIterator::get_wdf | ( | ) | const |
Return the wdf of the current term (if meaningful).
The wdf (within document frequency) is the number of occurrences of a term in a particular document.
Definition at line 82 of file omtermlistiterator.cc.
References Assert, internal, LOGCALL, and RETURN.
Referenced by FlintWritableDatabase::add_document_(), ChertWritableDatabase::add_document_(), BrassWritableDatabase::add_document_(), dbcheck(), DEFINE_TESTCASE(), InMemoryDatabase::finish_add_doc(), format_doc_termlist(), FlintWritableDatabase::replace_document(), ChertWritableDatabase::replace_document(), BrassWritableDatabase::replace_document(), serialise_document(), FlintTermListTable::set_termlist(), ChertTermListTable::set_termlist(), BrassTermListTable::set_termlist(), and show_termlist().
| string Xapian::TermIterator::operator* | ( | ) | const |
| DerefWrapper_<std::string> Xapian::TermIterator::operator++ | ( | int | ) | [inline] |
Advance the iterator to the next position (postfix version).
Definition at line 74 of file termiterator.h.
| Xapian::TermIterator & Xapian::TermIterator::operator++ | ( | ) |
Advance the iterator to the next position.
Definition at line 100 of file omtermlistiterator.cc.
References Assert, handle_prune(), internal, and LOGCALL_VOID.
| void Xapian::TermIterator::operator= | ( | const TermIterator & | other | ) |
Assignment is allowed.
The internals are reference counted, so assignment is also cheap.
Definition at line 66 of file omtermlistiterator.cc.
References internal, and LOGCALL_VOID.
| Xapian::PositionIterator Xapian::TermIterator::positionlist_begin | ( | ) | const |
Return PositionIterator pointing to start of positionlist for current term.
Definition at line 132 of file omtermlistiterator.cc.
References Assert, internal, LOGCALL, and RETURN.
Referenced by FlintWritableDatabase::add_document_(), ChertWritableDatabase::add_document_(), BrassWritableDatabase::add_document_(), dbcheck(), DEFINE_TESTCASE(), InMemoryDatabase::finish_add_doc(), format_doc_termlist(), FlintWritableDatabase::replace_document(), ChertWritableDatabase::replace_document(), BrassWritableDatabase::replace_document(), and serialise_document().
| Xapian::termcount Xapian::TermIterator::positionlist_count | ( | ) | const |
Return length of positionlist for current term.
Definition at line 123 of file omtermlistiterator.cc.
References Assert, internal, LOGCALL, and RETURN.
Referenced by dbcheck(), format_doc_termlist(), and serialise_document().
| PositionIterator Xapian::TermIterator::positionlist_end | ( | ) | const [inline] |
Return PositionIterator pointing to end of positionlist for current term.
Definition at line 112 of file termiterator.h.
Referenced by FlintWritableDatabase::add_document_(), ChertWritableDatabase::add_document_(), BrassWritableDatabase::add_document_(), dbcheck(), DEFINE_TESTCASE(), InMemoryDatabase::finish_add_doc(), format_doc_termlist(), FlintWritableDatabase::replace_document(), ChertWritableDatabase::replace_document(), BrassWritableDatabase::replace_document(), and serialise_document().
| void Xapian::TermIterator::skip_to | ( | const std::string & | tname | ) |
Advance the iterator to the specified term.
If the specified term isn't in the list, position ourselves on the first term after it (or at_end() if no greater terms are present).
Definition at line 112 of file omtermlistiterator.cc.
References Assert, handle_prune(), internal, and LOGCALL_VOID.
Referenced by DEFINE_TESTCASE().
For internal use only.
Reference counted internals.
Definition at line 44 of file termiterator.h.
Referenced by get_termfreq(), get_wdf(), operator*(), operator++(), operator=(), Xapian::operator==(), positionlist_begin(), positionlist_count(), skip_to(), and TermIterator().