xapian-core
1.4.27
|
Class for iterating over a list of terms. More...
#include <postingiterator.h>
Classes | |
class | Internal |
Abstract base class for postlists. More... | |
Public Member Functions | |
PostingIterator (const PostingIterator &o) | |
Copy constructor. More... | |
PostingIterator & | operator= (const PostingIterator &o) |
Assignment. More... | |
PostingIterator () | |
Default constructor. More... | |
~PostingIterator () | |
Destructor. More... | |
Xapian::docid | operator* () const |
Return the document id at the current position. More... | |
Xapian::termcount | get_wdf () const |
Return the wdf for the document at the current position. More... | |
Xapian::termcount | get_doclength () const |
Return the length of the document at the current position. More... | |
Xapian::termcount | get_unique_terms () const |
Return the number of unique terms in the current document. More... | |
PositionIterator | positionlist_begin () const |
Return a PositionIterator for the current document. More... | |
PositionIterator | positionlist_end () const |
Return an end PositionIterator for the current document. More... | |
PostingIterator & | operator++ () |
Advance the iterator to the next position. More... | |
DerefWrapper_< Xapian::docid > | operator++ (int) |
Advance the iterator to the next position (postfix version). More... | |
void | skip_to (Xapian::docid did) |
Advance the iterator to document did. More... | |
std::string | get_description () const |
Return a string describing this object. More... | |
Private Types | |
typedef std::input_iterator_tag | iterator_category |
typedef Xapian::docid | value_type |
typedef Xapian::doccount_diff | difference_type |
typedef Xapian::docid * | pointer |
typedef Xapian::docid & | reference |
Private Member Functions | |
PostingIterator (Internal *internal_) | |
void | decref () |
void | post_advance (Internal *res) |
Private Attributes | |
Internal * | internal |
Class for iterating over a list of terms.
Definition at line 41 of file postingiterator.h.
|
private |
PostingIterator is what the C++ STL calls an input_iterator.
The following typedefs allow std::iterator_traits<> to work so that this iterator can be used with the STL.
These are deliberately hidden from the Doxygen-generated docs, as the machinery here isn't interesting to API users. They just need to know that Xapian iterator classes are compatible with the STL.
Definition at line 150 of file postingiterator.h.
|
private |
PostingIterator is what the C++ STL calls an input_iterator.
The following typedefs allow std::iterator_traits<> to work so that this iterator can be used with the STL.
These are deliberately hidden from the Doxygen-generated docs, as the machinery here isn't interesting to API users. They just need to know that Xapian iterator classes are compatible with the STL.
Definition at line 146 of file postingiterator.h.
|
private |
PostingIterator is what the C++ STL calls an input_iterator.
The following typedefs allow std::iterator_traits<> to work so that this iterator can be used with the STL.
These are deliberately hidden from the Doxygen-generated docs, as the machinery here isn't interesting to API users. They just need to know that Xapian iterator classes are compatible with the STL.
Definition at line 152 of file postingiterator.h.
|
private |
PostingIterator is what the C++ STL calls an input_iterator.
The following typedefs allow std::iterator_traits<> to work so that this iterator can be used with the STL.
These are deliberately hidden from the Doxygen-generated docs, as the machinery here isn't interesting to API users. They just need to know that Xapian iterator classes are compatible with the STL.
Definition at line 154 of file postingiterator.h.
|
private |
PostingIterator is what the C++ STL calls an input_iterator.
The following typedefs allow std::iterator_traits<> to work so that this iterator can be used with the STL.
These are deliberately hidden from the Doxygen-generated docs, as the machinery here isn't interesting to API users. They just need to know that Xapian iterator classes are compatible with the STL.
Definition at line 148 of file postingiterator.h.
|
explicitprivate |
Construct given internals.
Definition at line 57 of file postingiterator.cc.
References decref(), internal, LOGCALL_CTOR, Xapian::PostingIterator::Internal::next(), and post_advance().
Xapian::PostingIterator::PostingIterator | ( | const PostingIterator & | o | ) |
|
inline |
Default constructor.
Creates an uninitialised iterator, which can't be used before being assigned to, but is sometimes syntactically convenient.
Definition at line 80 of file postingiterator.h.
|
inline |
|
private |
Definition at line 34 of file postingiterator.cc.
References Assert.
Referenced by operator=(), and PostingIterator().
std::string Xapian::PostingIterator::get_description | ( | ) | const |
Return a string describing this object.
Definition at line 160 of file postingiterator.cc.
Referenced by DEFINE_TESTCASE().
Xapian::termcount Xapian::PostingIterator::get_doclength | ( | ) | const |
Return the length of the document at the current position.
Definition at line 118 of file postingiterator.cc.
References Assert, Xapian::PostingIterator::Internal::get_doclength(), internal, LOGCALL, and RETURN.
Referenced by DEFINE_TESTCASE(), closedb1_iterators::perform(), and show_db_stats().
Xapian::termcount Xapian::PostingIterator::get_unique_terms | ( | ) | const |
Return the number of unique terms in the current document.
Definition at line 126 of file postingiterator.cc.
References Assert, Xapian::PostingIterator::Internal::get_unique_terms(), internal, LOGCALL, and RETURN.
Referenced by DEFINE_TESTCASE(), and closedb1_iterators::perform().
Xapian::termcount Xapian::PostingIterator::get_wdf | ( | ) | const |
Return the wdf for the document at the current position.
Definition at line 110 of file postingiterator.cc.
References Assert, Xapian::PostingIterator::Internal::get_wdf(), internal, LOGCALL, and RETURN.
Referenced by DEFINE_TESTCASE(), and main().
Xapian::docid Xapian::PostingIterator::operator* | ( | ) | const |
Return the document id at the current position.
Definition at line 93 of file postingiterator.cc.
References Assert, Xapian::PostingIterator::Internal::get_docid(), internal, LOGCALL, and RETURN.
PostingIterator & Xapian::PostingIterator::operator++ | ( | ) |
Advance the iterator to the next position.
Definition at line 101 of file postingiterator.cc.
References Assert, internal, LOGCALL, Xapian::PostingIterator::Internal::next(), post_advance(), and RETURN.
|
inline |
Advance the iterator to the next position (postfix version).
Definition at line 117 of file postingiterator.h.
PostingIterator & Xapian::PostingIterator::operator= | ( | const PostingIterator & | o | ) |
Assignment.
Definition at line 81 of file postingiterator.cc.
References Xapian::Internal::intrusive_base::_refs, decref(), internal, LOGCALL, and RETURN.
PositionIterator Xapian::PostingIterator::positionlist_begin | ( | ) | const |
Return a PositionIterator for the current document.
Definition at line 144 of file postingiterator.cc.
References Assert, internal, LOGCALL, Xapian::PostingIterator::Internal::open_position_list(), and RETURN.
Referenced by main().
|
inline |
Return an end PositionIterator for the current document.
Definition at line 109 of file postingiterator.h.
Referenced by main().
|
private |
Definition at line 42 of file postingiterator.cc.
References Xapian::Internal::intrusive_base::_refs.
Referenced by operator++(), PostingIterator(), and skip_to().
void Xapian::PostingIterator::skip_to | ( | Xapian::docid | did | ) |
Advance the iterator to document did.
did | The document id to advance to. If this document id isn't in the stream being iterated, then the iterator is moved to the next document id after it which is. |
Definition at line 152 of file postingiterator.cc.
References internal, LOGCALL_VOID, post_advance(), and Xapian::PostingIterator::Internal::skip_to().
Referenced by DEFINE_TESTCASE(), main(), Xapian::FixedWeightPostingSource::next(), and Xapian::FixedWeightPostingSource::skip_to().
|
private |
Reference counted internals.
Definition at line 44 of file postingiterator.h.
Referenced by get_doclength(), get_unique_terms(), get_wdf(), Xapian::iterator_valid(), operator*(), operator++(), operator=(), positionlist_begin(), PostingIterator(), and skip_to().