56 return last_docid == 0;
65 while (current_did++ < last_docid) {
69 void * d = db->open_document(current_did,
true);
72 AutoPtr<Xapian::Document::Internal>
73 doc(static_cast<Xapian::Document::Internal*>(d));
74 string value = doc->get_value(slot);
76 swap(current_value, value);
90 if (did <= current_did)
return;
91 current_did = did - 1;
98 if (did <= current_did) {
99 return !current_value.empty();
102 if (did > last_docid) {
110 void * d = db->open_document(current_did,
true);
112 AutoPtr<Xapian::Document::Internal>
113 doc(static_cast<Xapian::Document::Internal*>(d));
114 current_value = doc->get_value(slot);
115 if (!current_value.empty())
return true;
119 current_value = string();
126 string desc =
"SlowValueList(slot=";
128 if (last_docid != 0) {
130 desc +=
str(current_did);
131 desc +=
", value=\"";
bool at_end() const
Return true if the current position is past the last entry in this list.
Xapian::docid get_docid() const
Return the docid at the current position.
Convert types to std::string.
bool check(Xapian::docid did)
Check if the specified docid occurs in this valuestream.
Hierarchy of classes which Xapian can throw as exceptions.
void description_append(std::string &desc, const std::string &s)
string str(int value)
Convert int to std::string.
std::string get_description() const
Return a string description of this object.
Indicates an attempt to access a document not present in the database.
std::string get_value() const
Return the value at the current position.
Append a string to an object description, escaping invalid UTF-8.
Slow implementation for backends which don't streamed values.
unsigned valueno
The number for a value slot in a document.
unsigned XAPIAN_DOCID_BASE_TYPE docid
A unique identifier for a document.
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.
Xapian::valueno get_valueno() const
Return the value slot for the current position/this iterator.
Wrapper around standard unique_ptr template.