xapian-core
1.4.27
|
Class for iterating over term positions. More...
#include <positioniterator.h>
Classes | |
class | Internal |
Abstract base class for iterating term positions in a document. More... | |
Public Member Functions | |
PositionIterator (const PositionIterator &o) | |
Copy constructor. More... | |
PositionIterator & | operator= (const PositionIterator &o) |
Assignment. More... | |
PositionIterator () | |
Default constructor. More... | |
~PositionIterator () | |
Destructor. More... | |
Xapian::termpos | operator* () const |
Return the term position at the current iterator position. More... | |
PositionIterator & | operator++ () |
Advance the iterator to the next position. More... | |
DerefWrapper_< Xapian::termpos > | operator++ (int) |
Advance the iterator to the next position (postfix version). More... | |
void | skip_to (Xapian::termpos termpos) |
Advance the iterator to term position termpos. More... | |
std::string | get_description () const |
Return a string describing this object. More... | |
Private Types | |
typedef std::input_iterator_tag | iterator_category |
typedef Xapian::termpos | value_type |
typedef Xapian::termpos_diff | difference_type |
typedef Xapian::termpos * | pointer |
typedef Xapian::termpos & | reference |
Private Member Functions | |
void | decref () |
PositionIterator (Internal *internal_) | |
Private Attributes | |
Internal * | internal |
Class for iterating over term positions.
Definition at line 40 of file positioniterator.h.
|
private |
PositionIterator 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 129 of file positioniterator.h.
|
private |
PositionIterator 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 125 of file positioniterator.h.
|
private |
PositionIterator 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 131 of file positioniterator.h.
|
private |
PositionIterator 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 133 of file positioniterator.h.
|
private |
PositionIterator 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 127 of file positioniterator.h.
|
explicitprivate |
Construct given internals.
Definition at line 41 of file positioniterator.cc.
References Assert, decref(), internal, LOGCALL_CTOR, and Xapian::PositionIterator::Internal::next().
Xapian::PositionIterator::PositionIterator | ( | const PositionIterator & | 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 81 of file positioniterator.h.
|
inline |
|
private |
Definition at line 34 of file positioniterator.cc.
References Assert.
Referenced by operator++(), operator=(), PositionIterator(), and skip_to().
std::string Xapian::PositionIterator::get_description | ( | ) | const |
Return a string describing this object.
Definition at line 112 of file positioniterator.cc.
Xapian::termpos Xapian::PositionIterator::operator* | ( | ) | const |
Return the term position at the current iterator position.
Definition at line 80 of file positioniterator.cc.
References Assert, Xapian::PositionIterator::Internal::get_position(), internal, LOGCALL, and RETURN.
PositionIterator & Xapian::PositionIterator::operator++ | ( | ) |
Advance the iterator to the next position.
Definition at line 88 of file positioniterator.cc.
References Assert, decref(), internal, LOGCALL, Xapian::PositionIterator::Internal::next(), and RETURN.
|
inline |
Advance the iterator to the next position (postfix version).
Definition at line 96 of file positioniterator.h.
PositionIterator & Xapian::PositionIterator::operator= | ( | const PositionIterator & | o | ) |
Assignment.
Definition at line 68 of file positioniterator.cc.
References Xapian::Internal::intrusive_base::_refs, decref(), internal, LOGCALL, and RETURN.
void Xapian::PositionIterator::skip_to | ( | Xapian::termpos | termpos | ) |
Advance the iterator to term position termpos.
termpos | The position to advance to. If this position isn't in the stream being iterated, then the iterator is moved to the next term position after it which is. |
Definition at line 100 of file positioniterator.cc.
References decref(), internal, LOGCALL_VOID, and Xapian::PositionIterator::Internal::skip_to().
Referenced by DEFINE_TESTCASE(), and main().
|
private |
Reference counted internals.
Definition at line 45 of file positioniterator.h.
Referenced by Xapian::iterator_valid(), operator*(), operator++(), operator=(), PositionIterator(), and skip_to().