xapian-core
1.4.27
|
Abstract base class for value streams. More...
#include <valuelist.h>
Public Member Functions | |
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... | |
virtual Xapian::docid | get_docid () const =0 |
Return the docid at the current position. More... | |
virtual std::string | get_value () const =0 |
Return the value at the current position. More... | |
virtual Xapian::valueno | get_valueno () const =0 |
Return the value slot for the current position/this iterator. More... | |
virtual bool | at_end () const =0 |
Return true if the current position is past the last entry in this list. More... | |
virtual void | next ()=0 |
Advance the current position to the next document in the value stream. More... | |
virtual void | skip_to (Xapian::docid)=0 |
Skip forward to the specified docid. More... | |
virtual bool | check (Xapian::docid did) |
Check if the specified docid occurs in this valuestream. More... | |
virtual std::string | get_description () const =0 |
Return a string description of this object. More... | |
Public Member Functions inherited from Xapian::Internal::intrusive_base | |
intrusive_base () | |
Construct with no references. More... | |
Protected Member Functions | |
Internal () | |
Only constructable as a base class for derived classes. More... | |
Private Member Functions | |
void | operator= (const Internal &) |
Don't allow assignment. More... | |
Internal (const Internal &) | |
Don't allow copying. More... | |
Additional Inherited Members | |
Public Attributes inherited from Xapian::Internal::intrusive_base | |
unsigned | _refs |
Reference count. More... | |
Abstract base class for value streams.
Definition at line 31 of file valuelist.h.
|
private |
Don't allow copying.
|
inlineprotected |
Only constructable as a base class for derived classes.
Definition at line 40 of file valuelist.h.
References at_end(), check(), get_description(), get_docid(), get_value(), get_valueno(), next(), skip_to(), and ~Internal().
|
virtual |
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.
Definition at line 27 of file valuelist.cc.
Referenced by Internal().
|
pure virtual |
Return true if the current position is past the last entry in this list.
Implemented in MultiValueList, SlowValueList, ChertValueList, GlassValueList, and DocumentValueList.
Referenced by SubValueList::at_end(), Xapian::ValueIterator::check(), ValueStreamDocument::do_get_value(), Internal(), Xapian::ValueIterator::operator++(), Xapian::ValueIterator::skip_to(), and Xapian::ValueIterator::ValueIterator().
|
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 in MultiValueList, SlowValueList, ChertValueList, and GlassValueList.
Definition at line 30 of file valuelist.cc.
References skip_to().
Referenced by Xapian::ValueIterator::check(), ValueStreamDocument::do_get_value(), and Internal().
|
pure virtual |
Return a string description of this object.
Implemented in MultiValueList, SlowValueList, ChertValueList, GlassValueList, and DocumentValueList.
Referenced by Internal().
|
pure virtual |
Return the docid at the current position.
Implemented in MultiValueList, SlowValueList, ChertValueList, GlassValueList, and DocumentValueList.
Referenced by ValueStreamDocument::do_get_value(), SubValueList::get_docid(), Xapian::ValueIterator::get_docid(), SubValueList::get_merged_docid(), and Internal().
|
pure virtual |
Return the value at the current position.
Implemented in MultiValueList, SlowValueList, ChertValueList, GlassValueList, and DocumentValueList.
Referenced by ValueStreamDocument::do_get_value(), SubValueList::get_value(), Internal(), and Xapian::ValueIterator::operator*().
|
pure virtual |
Return the value slot for the current position/this iterator.
Implemented in MultiValueList, SlowValueList, ChertValueList, GlassValueList, and DocumentValueList.
Referenced by Xapian::ValueIterator::get_valueno(), and Internal().
|
pure 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.
Implemented in MultiValueList, SlowValueList, ChertValueList, GlassValueList, and DocumentValueList.
Referenced by Internal(), and SubValueList::next().
|
private |
Don't allow assignment.
|
pure 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).
Implemented in MultiValueList, SlowValueList, ChertValueList, GlassValueList, and DocumentValueList.
Referenced by check(), Internal(), and SubValueList::skip_to().