30 using namespace Glass;
37 if (!first_did)
return false;
40 const string & tag = cursor->current_tag;
41 reader.assign(tag.data(), tag.size(), first_did);
54 return reader.get_docid();
67 return reader.get_value();
73 return cursor == NULL;
80 cursor = db->get_postlist_cursor();
83 }
else if (!reader.at_end()) {
85 if (!reader.at_end())
return;
89 if (!cursor->after_end()) {
90 if (update_reader()) {
91 if (!reader.at_end())
return;
104 cursor = db->get_postlist_cursor();
106 }
else if (!reader.at_end()) {
108 if (!reader.at_end())
return;
112 if (update_reader()) {
114 if (!reader.at_end())
return;
121 if (!cursor->after_end()) {
122 if (update_reader()) {
123 if (!reader.at_end())
return;
136 cursor = db->get_postlist_cursor();
137 if (!cursor)
return true;
138 }
else if (!reader.at_end()) {
141 if (!reader.at_end())
return true;
147 if (update_reader()) {
149 if (!reader.at_end())
return true;
155 Assert(!cursor->after_end());
156 if (!update_reader()) {
168 string desc(
"GlassValueList(slot=");
void skip_to(Xapian::docid)
Skip forward to the specified docid.
void next()
Advance the current position to the next document in the value stream.
Xapian::docid docid_from_key(Xapian::valueno required_slot, const std::string &key)
Glass class for value streams.
std::string make_valuechunk_key(Xapian::valueno slot, Xapian::docid did)
Generate a key for a value stream chunk.
Convert types to std::string.
bool update_reader()
Update reader to use the chunk currently pointed to by cursor.
string str(int value)
Convert int to std::string.
C++ class definition for glass database.
std::string get_value() const
Return the value at the current position.
std::string get_description() const
Return a string description of this object.
Interface to Btree cursors.
Xapian::docid get_docid() const
Return the docid at the current position.
unsigned valueno
The number for a value slot in a document.
bool at_end() const
Return true if the current position is past the last entry in this list.
Various assertion macros.
unsigned XAPIAN_DOCID_BASE_TYPE docid
A unique identifier for a document.
bool check(Xapian::docid did)
Check if the specified docid occurs in this valuestream.
Xapian::valueno get_valueno() const
Return the value slot for the current position/this iterator.