39 : valuelist(vl), db_idx(db_idx_) { }
47 did = (did - 1) / multiplier + 1 + ((did - 1) % multiplier > db_idx);
56 return (valuelist->
get_docid() - 1) * multiplier + db_idx + 1;
74 if (did_a > did_b)
return true;
75 if (did_a < did_b)
return false;
86 : current_docid(0), slot(slot_), multiplier(dbs.size())
93 vector<intrusive_ptr<Xapian::Database::Internal> >::const_iterator i;
94 for (i = dbs.begin(); i != dbs.end(); ++i) {
142 vector<SubValueList *>::iterator i =
valuelists.begin();
145 if ((*i)->at_end()) {
183 vector<SubValueList*>::iterator i =
valuelists.begin();
186 if ((*i)->at_end()) {
214 return "MultiValueList()";
void skip_to(Xapian::docid did, size_t multiplier)
Xapian::docid current_docid
Current docid (or 0 if we haven't started yet).
bool at_end() const
Return true if the current position is past the last entry in this list.
virtual bool at_end() const =0
Return true if the current position is past the last entry in this list.
#define AssertRel(A, REL, B)
Xapian::valueno slot
The value slot we're iterating over.
Xapian::valueno get_valueno() const
Return the value slot for the current position/this iterator.
SubValueList(ValueList *vl, unsigned db_idx_)
MultiValueList(const MultiValueList &)
Don't allow copying.
std::string get_value() const
Hierarchy of classes which Xapian can throw as exceptions.
Xapian::docid get_merged_docid(unsigned multiplier) const
Comparison functor which orders SubValueList* by ascending docid.
Xapian::docid get_docid() const
Return the docid at the current position.
std::string get_value() const
Return the value at the current position.
Class for merging ValueList objects from subdatabases.
bool check(Xapian::docid did)
Check if the specified docid occurs in this valuestream.
void skip_to(Xapian::docid)
Skip forward to the specified docid.
bool operator()(const SubValueList *a, const SubValueList *b) const
Order by ascending docid.
virtual Xapian::docid get_docid() const =0
Return the docid at the current position.
~MultiValueList()
Destructor.
virtual void next()=0
Advance the current position to the next document in the value stream.
Abstract base class for value streams.
void next()
Advance the current position to the next document in the value stream.
virtual std::string get_value() const =0
Return the value at the current position.
std::string get_description() const
Return a string description of this object.
unsigned valueno
The number for a value slot in a document.
std::vector< SubValueList * > valuelists
Vector of sub-valuelists which we use as a heap.
Various assertion macros.
unsigned XAPIAN_DOCID_BASE_TYPE docid
A unique identifier for a document.
virtual void skip_to(Xapian::docid)=0
Skip forward to the specified docid.
A smart pointer that uses intrusive reference counting.
Xapian::docid get_docid() const
void operator()(CLASS *p) const