#include <slowvaluelist.h>


Public Member Functions | |
| SlowValueList (const Xapian::Database &db_, Xapian::valueno slot_) | |
| Xapian::docid | get_docid () const |
| Return the docid at the current position. | |
| std::string | get_value () const |
| Return the value at the current position. | |
| Xapian::valueno | get_valueno () const |
| Return the value slot for the current position/this iterator. | |
| bool | at_end () const |
| Return true if the current position is past the last entry in this list. | |
| void | next () |
| Advance the current position to the next document in the value stream. | |
| void | skip_to (Xapian::docid) |
| Skip forward to the specified docid. | |
| bool | check (Xapian::docid did) |
| Check if the specified docid occurs in this valuestream. | |
| std::string | get_description () const |
| Return a string description of this object. | |
Private Member Functions | |
| void | operator= (const SlowValueList &) |
| Don't allow assignment. | |
| SlowValueList (const SlowValueList &) | |
| Don't allow copying. | |
Private Attributes | |
| Xapian::Database | db |
| The database. | |
| Xapian::docid | last_docid |
| The last docid in the database, or 0 if we're at_end. | |
| Xapian::valueno | slot |
| The value slot we're iterating over. | |
| std::string | current_value |
| The value at the current position. | |
| Xapian::docid | current_did |
| The document id at the current position. | |
Used by flint, inmemory, and remote backends.
Definition at line 32 of file slowvaluelist.h.
| SlowValueList::SlowValueList | ( | const SlowValueList & | ) | [private] |
Don't allow copying.
| SlowValueList::SlowValueList | ( | const Xapian::Database & | db_, | |
| Xapian::valueno | slot_ | |||
| ) | [inline] |
Definition at line 55 of file slowvaluelist.h.
| bool SlowValueList::at_end | ( | ) | const [virtual] |
Return true if the current position is past the last entry in this list.
Implements Xapian::ValueIterator::Internal.
Definition at line 53 of file slowvaluelist.cc.
References last_docid.
| bool SlowValueList::check | ( | Xapian::docid | did | ) | [virtual] |
Check if the specified docid occurs in this valuestream.
The caller is required to ensure that the specified docid actually exists in the database.
This method acts like skip_to() if that can be done at little extra cost, in which case it then returns true.
Otherwise it simply checks if a particular docid is present. If it is, it returns true. If it isn't, it returns false, and leaves the position unspecified (and hence the result of calling methods which depends on the current position, such as get_docid(), are also unspecified). In this state, next() will advance to the first matching position after docid, and skip_to() will act as it would if the position was the first matching position after docid.
The default implementation calls skip_to().
Reimplemented from Xapian::ValueIterator::Internal.
Definition at line 100 of file slowvaluelist.cc.
References current_did, current_value, db, Xapian::Database::get_document_lazily(), last_docid, and slot.
| string SlowValueList::get_description | ( | ) | const [virtual] |
Return a string description of this object.
Implements Xapian::ValueIterator::Internal.
Definition at line 124 of file slowvaluelist.cc.
References current_did, current_value, last_docid, slot, and Xapian::Internal::str().
| Xapian::docid SlowValueList::get_docid | ( | ) | const [virtual] |
Return the docid at the current position.
Implements Xapian::ValueIterator::Internal.
Definition at line 35 of file slowvaluelist.cc.
References current_did.
| string SlowValueList::get_value | ( | ) | const [virtual] |
Return the value at the current position.
Implements Xapian::ValueIterator::Internal.
Definition at line 41 of file slowvaluelist.cc.
References current_value.
| Xapian::valueno SlowValueList::get_valueno | ( | ) | const [virtual] |
Return the value slot for the current position/this iterator.
Implements Xapian::ValueIterator::Internal.
Definition at line 47 of file slowvaluelist.cc.
References slot.
| void SlowValueList::next | ( | ) | [virtual] |
Advance the current position to the next document in the value stream.
The list starts before the first entry in the list, so next() must be called before any methods which need the context of the current position.
Implements Xapian::ValueIterator::Internal.
Definition at line 59 of file slowvaluelist.cc.
References current_did, current_value, db, Xapian::Database::get_document_lazily(), last_docid, and slot.
Referenced by skip_to().
| void SlowValueList::operator= | ( | const SlowValueList & | ) | [private] |
Don't allow assignment.
| void SlowValueList::skip_to | ( | Xapian::docid | ) | [virtual] |
Skip forward to the specified docid.
If the specified docid isn't in the list, position ourselves on the first document after it (or at_end() if no greater docids are present).
Implements Xapian::ValueIterator::Internal.
Definition at line 85 of file slowvaluelist.cc.
References current_did, last_docid, and next().
Xapian::docid SlowValueList::current_did [private] |
The document id at the current position.
Definition at line 52 of file slowvaluelist.h.
Referenced by check(), get_description(), get_docid(), next(), and skip_to().
std::string SlowValueList::current_value [private] |
The value at the current position.
Definition at line 49 of file slowvaluelist.h.
Referenced by check(), get_description(), get_value(), and next().
Xapian::Database SlowValueList::db [private] |
Xapian::docid SlowValueList::last_docid [private] |
The last docid in the database, or 0 if we're at_end.
Definition at line 43 of file slowvaluelist.h.
Referenced by at_end(), check(), get_description(), next(), and skip_to().
Xapian::valueno SlowValueList::slot [private] |
The value slot we're iterating over.
Definition at line 46 of file slowvaluelist.h.
Referenced by check(), get_description(), get_valueno(), and next().