xapian-core
1.4.27
|
Slow implementation for backends which don't streamed values. More...
#include <slowvaluelist.h>
Public Member Functions | |
SlowValueList (const Xapian::Database::Internal *db_, Xapian::valueno slot_) | |
Xapian::docid | get_docid () const |
Return the docid at the current position. More... | |
std::string | get_value () const |
Return the value at the current position. More... | |
Xapian::valueno | get_valueno () const |
Return the value slot for the current position/this iterator. More... | |
bool | at_end () const |
Return true if the current position is past the last entry in this list. More... | |
void | next () |
Advance the current position to the next document in the value stream. More... | |
void | skip_to (Xapian::docid) |
Skip forward to the specified docid. More... | |
bool | check (Xapian::docid did) |
Check if the specified docid occurs in this valuestream. More... | |
std::string | get_description () const |
Return a string description of this object. More... | |
Public Member Functions inherited from Xapian::ValueIterator::Internal | |
virtual | ~Internal () |
We have virtual methods and want to be able to delete derived classes using a pointer to the base class, so we need a virtual destructor. More... | |
Public Member Functions inherited from Xapian::Internal::intrusive_base | |
intrusive_base () | |
Construct with no references. More... | |
Private Member Functions | |
void | operator= (const SlowValueList &) |
Don't allow assignment. More... | |
SlowValueList (const SlowValueList &) | |
Don't allow copying. More... | |
Private Attributes | |
Xapian::Internal::intrusive_ptr< const Xapian::Database::Internal > | db |
The subdatabase. More... | |
Xapian::docid | last_docid |
The last docid in the database, or 0 if we're at_end. More... | |
Xapian::valueno | slot |
The value slot we're iterating over. More... | |
std::string | current_value |
The value at the current position. More... | |
Xapian::docid | current_did |
The document id at the current position. More... | |
Additional Inherited Members | |
Public Attributes inherited from Xapian::Internal::intrusive_base | |
unsigned | _refs |
Reference count. More... | |
Protected Member Functions inherited from Xapian::ValueIterator::Internal | |
Internal () | |
Only constructable as a base class for derived classes. More... | |
Slow implementation for backends which don't streamed values.
Used by inmemory and remote backends.
Definition at line 32 of file slowvaluelist.h.
|
private |
Don't allow copying.
|
inline |
Definition at line 55 of file slowvaluelist.h.
References at_end(), check(), get_description(), get_docid(), get_value(), get_valueno(), next(), and skip_to().
|
virtual |
Return true if the current position is past the last entry in this list.
Implements Xapian::ValueIterator::Internal.
Definition at line 54 of file slowvaluelist.cc.
Referenced by SlowValueList().
|
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 depend 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 96 of file slowvaluelist.cc.
Referenced by SlowValueList().
|
virtual |
Return a string description of this object.
Implements Xapian::ValueIterator::Internal.
Definition at line 124 of file slowvaluelist.cc.
References description_append(), and Xapian::Internal::str().
Referenced by SlowValueList().
|
virtual |
Return the docid at the current position.
Implements Xapian::ValueIterator::Internal.
Definition at line 36 of file slowvaluelist.cc.
Referenced by SlowValueList().
|
virtual |
Return the value at the current position.
Implements Xapian::ValueIterator::Internal.
Definition at line 42 of file slowvaluelist.cc.
Referenced by SlowValueList().
|
virtual |
Return the value slot for the current position/this iterator.
Implements Xapian::ValueIterator::Internal.
Definition at line 48 of file slowvaluelist.cc.
Referenced by SlowValueList().
|
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(), skip_to() or check() must be called before any methods which need the context of the current position.
Implements Xapian::ValueIterator::Internal.
Definition at line 60 of file slowvaluelist.cc.
Referenced by SlowValueList().
|
private |
Don't allow assignment.
|
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 88 of file slowvaluelist.cc.
Referenced by SlowValueList().
|
private |
The document id at the current position.
Definition at line 52 of file slowvaluelist.h.
|
private |
The value at the current position.
Definition at line 49 of file slowvaluelist.h.
|
private |
The subdatabase.
Definition at line 40 of file slowvaluelist.h.
|
private |
The last docid in the database, or 0 if we're at_end.
Definition at line 43 of file slowvaluelist.h.
|
private |
The value slot we're iterating over.
Definition at line 46 of file slowvaluelist.h.