#include <multivaluelist.h>


Public Member Functions | |
| MultiValueList (const std::vector< Xapian::Internal::RefCntPtr< Xapian::Database::Internal > > &dbs, Xapian::valueno slot_) | |
| Constructor. | |
| ~MultiValueList () | |
| Destructor. | |
| 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 MultiValueList &) |
| Don't allow assignment. | |
| MultiValueList (const MultiValueList &) | |
| Don't allow copying. | |
Private Attributes | |
| Xapian::docid | current_docid |
| Current docid (or 0 if we haven't started yet). | |
| std::vector< SubValueList * > | valuelists |
| Vector of sub-valuelists which we use as a heap. | |
| Xapian::valueno | slot |
| The value slot we're iterating over. | |
| size_t | multiplier |
Definition at line 34 of file multivaluelist.h.
| MultiValueList::MultiValueList | ( | const MultiValueList & | ) | [private] |
Don't allow copying.
| MultiValueList::MultiValueList | ( | const std::vector< Xapian::Internal::RefCntPtr< Xapian::Database::Internal > > & | dbs, | |
| Xapian::valueno | slot_ | |||
| ) |
Constructor.
Definition at line 83 of file multi_valuelist.cc.
References AssertRel, multiplier, slot, and valuelists.
| MultiValueList::~MultiValueList | ( | ) |
| bool MultiValueList::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 130 of file multi_valuelist.cc.
References valuelists.
Referenced by get_docid(), and get_value().
| bool MultiValueList::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 sets valid to 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 203 of file multi_valuelist.cc.
References skip_to().
| string MultiValueList::get_description | ( | ) | const [virtual] |
Return a string description of this object.
Implements Xapian::ValueIterator::Internal.
Definition at line 211 of file multi_valuelist.cc.
| Xapian::docid MultiValueList::get_docid | ( | ) | const [virtual] |
Return the docid at the current position.
Implements Xapian::ValueIterator::Internal.
Definition at line 110 of file multi_valuelist.cc.
References Assert, at_end(), and current_docid.
| std::string MultiValueList::get_value | ( | ) | const [virtual] |
Return the value at the current position.
Implements Xapian::ValueIterator::Internal.
Definition at line 117 of file multi_valuelist.cc.
References Assert, at_end(), and valuelists.
| Xapian::valueno MultiValueList::get_valueno | ( | ) | const [virtual] |
Return the value slot for the current position/this iterator.
Implements Xapian::ValueIterator::Internal.
Definition at line 124 of file multi_valuelist.cc.
References slot.
| void MultiValueList::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 136 of file multi_valuelist.cc.
References current_docid, multiplier, rare, and valuelists.
| void MultiValueList::operator= | ( | const MultiValueList & | ) | [private] |
Don't allow assignment.
| void MultiValueList::skip_to | ( | Xapian::docid | did | ) | [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 177 of file multi_valuelist.cc.
References current_docid, multiplier, and valuelists.
Referenced by check().
Xapian::docid MultiValueList::current_docid [private] |
Current docid (or 0 if we haven't started yet).
Definition at line 42 of file multivaluelist.h.
Referenced by get_docid(), next(), and skip_to().
size_t MultiValueList::multiplier [private] |
Definition at line 50 of file multivaluelist.h.
Referenced by MultiValueList(), next(), and skip_to().
Xapian::valueno MultiValueList::slot [private] |
The value slot we're iterating over.
Definition at line 48 of file multivaluelist.h.
Referenced by get_valueno(), and MultiValueList().
std::vector<SubValueList *> MultiValueList::valuelists [private] |
Vector of sub-valuelists which we use as a heap.
Definition at line 45 of file multivaluelist.h.
Referenced by at_end(), get_value(), MultiValueList(), next(), skip_to(), and ~MultiValueList().