Xapian::ValueIterator::Internal Class Reference

Abstract base class for value streams. More...

#include <valuelist.h>

Inheritance diagram for Xapian::ValueIterator::Internal:

Inheritance graph
[legend]
Collaboration diagram for Xapian::ValueIterator::Internal:

Collaboration graph
[legend]

List of all members.

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.
virtual Xapian::docid get_docid () const =0
 Return the docid at the current position.
virtual std::string get_value () const =0
 Return the value at the current position.
virtual Xapian::valueno get_valueno () const =0
 Return the value slot for the current position/this iterator.
virtual bool at_end () const =0
 Return true if the current position is past the last entry in this list.
virtual void next ()=0
 Advance the current position to the next document in the value stream.
virtual void skip_to (Xapian::docid)=0
 Skip forward to the specified docid.
virtual bool check (Xapian::docid did)
 Check if the specified docid occurs in this valuestream.
virtual std::string get_description () const =0
 Return a string description of this object.

Protected Member Functions

 Internal ()
 Only constructable as a base class for derived classes.

Private Member Functions

void operator= (const Internal &)
 Don't allow assignment.
 Internal (const Internal &)
 Don't allow copying.


Detailed Description

Abstract base class for value streams.

Definition at line 31 of file valuelist.h.


Constructor & Destructor Documentation

Xapian::ValueIterator::Internal::Internal ( const Internal  )  [private]

Don't allow copying.

Xapian::ValueIterator::Internal::Internal (  )  [inline, protected]

Only constructable as a base class for derived classes.

Definition at line 40 of file valuelist.h.

Xapian::ValueIterator::Internal::~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.


Member Function Documentation

virtual bool Xapian::ValueIterator::Internal::at_end (  )  const [pure virtual]

bool Xapian::ValueIterator::Internal::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 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 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 in BrassValueList, ChertValueList, SlowValueList, and MultiValueList.

Definition at line 30 of file valuelist.cc.

References skip_to().

Referenced by ValueRangePostList::check(), ValueGePostList::check(), and ValueStreamDocument::do_get_value().

virtual std::string Xapian::ValueIterator::Internal::get_description (  )  const [pure virtual]

Return a string description of this object.

Implemented in DocumentValueList, BrassValueList, ChertValueList, SlowValueList, and MultiValueList.

virtual Xapian::docid Xapian::ValueIterator::Internal::get_docid (  )  const [pure virtual]

virtual std::string Xapian::ValueIterator::Internal::get_value (  )  const [pure virtual]

virtual Xapian::valueno Xapian::ValueIterator::Internal::get_valueno (  )  const [pure virtual]

Return the value slot for the current position/this iterator.

Implemented in DocumentValueList, BrassValueList, ChertValueList, SlowValueList, and MultiValueList.

virtual void Xapian::ValueIterator::Internal::next (  )  [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() must be called before any methods which need the context of the current position.

Implemented in DocumentValueList, BrassValueList, ChertValueList, SlowValueList, and MultiValueList.

Referenced by ValueRangePostList::next(), ValueGePostList::next(), SubValueList::next(), ValueRangePostList::skip_to(), and ValueGePostList::skip_to().

void Xapian::ValueIterator::Internal::operator= ( const Internal  )  [private]

Don't allow assignment.

virtual void Xapian::ValueIterator::Internal::skip_to ( Xapian::docid   )  [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 DocumentValueList, BrassValueList, ChertValueList, SlowValueList, and MultiValueList.

Referenced by check(), ValueRangePostList::skip_to(), ValueGePostList::skip_to(), and SubValueList::skip_to().


The documentation for this class was generated from the following files:

Documentation for Xapian (version 1.2.13).
Generated on 9 Jan 2013 by Doxygen 1.5.9.