#include <valuegepostlist.h>
Inheritance diagram for ValueGePostList:
Public Member Functions | |
ValueGePostList (const Xapian::Database::Internal *db_, Xapian::valueno valno_, const std::string &begin_) | |
PostList * | next (Xapian::weight w_min) |
Advance the current position to the next document in the postlist. | |
PostList * | skip_to (Xapian::docid, Xapian::weight w_min) |
Skip forward to the specified docid. | |
PostList * | check (Xapian::docid did, Xapian::weight w_min, bool &valid) |
Check if the specified docid occurs in this postlist. | |
string | get_description () const |
Return a string description of this object. | |
Private Member Functions | |
ValueGePostList (const ValueGePostList &) | |
Disallow copying. | |
void | operator= (const ValueGePostList &) |
Disallow assignment. |
Definition at line 27 of file valuegepostlist.h.
ValueGePostList::ValueGePostList | ( | const ValueGePostList & | ) | [private] |
Disallow copying.
ValueGePostList::ValueGePostList | ( | const Xapian::Database::Internal * | db_, | |
Xapian::valueno | valno_, | |||
const std::string & | begin_ | |||
) | [inline] |
Definition at line 35 of file valuegepostlist.h.
void ValueGePostList::operator= | ( | const ValueGePostList & | ) | [private] |
Disallow assignment.
PostList * ValueGePostList::next | ( | Xapian::weight | w_min | ) | [virtual] |
Advance the current position to the next document in the postlist.
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.
w_min | The minimum weight contribution that is needed (this is just a hint which PostList subclasses may ignore). |
Reimplemented from ValueRangePostList.
Definition at line 35 of file valuegepostlist.cc.
References ValueRangePostList::alldocs_pl, Assert, Xapian::PostingIterator::Internal::at_end(), ValueRangePostList::begin, ValueRangePostList::current, ValueRangePostList::db, Xapian::PostingIterator::Internal::get_docid(), Xapian::PostingIterator::Internal::next(), Xapian::Database::Internal::open_document(), Xapian::Database::Internal::open_post_list(), Xapian::PostingIterator::Internal::skip_to(), and ValueRangePostList::valno.
PostList * ValueGePostList::skip_to | ( | Xapian::docid | , | |
Xapian::weight | w_min | |||
) | [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).
w_min | The minimum weight contribution that is needed (this is just a hint which PostList subclasses may ignore). |
Reimplemented from ValueRangePostList.
Definition at line 52 of file valuegepostlist.cc.
References Assert, ValueRangePostList::current, ValueRangePostList::db, and Xapian::PostingIterator::Internal::next().
PostList * ValueGePostList::check | ( | Xapian::docid | did, | |
Xapian::weight | w_min, | |||
bool & | valid | |||
) | [virtual] |
Check if the specified docid occurs in this postlist.
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, valid is set to true. If it isn't, it sets valid to 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 ValueRangePostList.
Definition at line 61 of file valuegepostlist.cc.
References Assert, AssertRelParanoid, ValueRangePostList::begin, ValueRangePostList::current, ValueRangePostList::db, Xapian::Database::Internal::get_lastdocid(), Xapian::Database::Internal::open_document(), and ValueRangePostList::valno.
string ValueGePostList::get_description | ( | ) | const [virtual] |
Return a string description of this object.
Reimplemented from ValueRangePostList.
Definition at line 77 of file valuegepostlist.cc.
References ValueRangePostList::begin, om_tostring(), and ValueRangePostList::valno.