Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

Xapian::PostingIterator Class Reference

An iterator pointing to items in a list of postings. More...

#include <postingiterator.h>

Collaboration diagram for Xapian::PostingIterator:

Collaboration graph
[legend]
List of all members.

Public Types

typedef std::input_iterator_tag iterator_category
typedef Xapian::docid value_type
typedef Xapian::doccount_diff difference_type
typedef Xapian::docidpointer
typedef Xapian::docidreference

Public Member Functions

 PostingIterator ()
 Default constructor - for declaring an uninitialised iterator.
 ~PostingIterator ()
 Destructor.
 PostingIterator (const PostingIterator &other)
 Copying is allowed.
void operator= (const PostingIterator &other)
 Assignment is allowed.
PostingIteratoroperator++ ()
DocIDWrapper operator++ (int)
void skip_to (Xapian::docid did)
Xapian::docid operator * () const
 Get the document id at the current position in the postlist.
Xapian::doclength get_doclength () const
 Get the length of the document at the current position in the postlist.
Xapian::termcount get_wdf () const
 Get the within document frequency of the document at the current position in the postlist.
PositionIterator positionlist_begin ()
PositionIterator positionlist_end ()
std::string get_description () const
 Returns a string describing this object.

Public Attributes

Xapian::Internal::RefCntPtr<
Internal > 
internal
 Reference counted internals.

Friends

bool operator== (const PostingIterator &a, const PostingIterator &b)
 Test equality of two PostingIterators.

Detailed Description

An iterator pointing to items in a list of postings.


Constructor & Destructor Documentation

Xapian::PostingIterator::PostingIterator  ) 
 

Default constructor - for declaring an uninitialised iterator.

Xapian::PostingIterator::~PostingIterator  ) 
 

Destructor.

Xapian::PostingIterator::PostingIterator const PostingIterator other  ) 
 

Copying is allowed.

The internals are reference counted, so copying is also cheap.


Member Function Documentation

std::string Xapian::PostingIterator::get_description  )  const
 

Returns a string describing this object.

Introspection method.

Xapian::doclength Xapian::PostingIterator::get_doclength  )  const
 

Get the length of the document at the current position in the postlist.

This information may be stored in the postlist, in which case this lookup should be extremely fast (indeed, not require further disk access). If the information is not present in the postlist, it will be retrieved from the database, at a greater performance cost.

Xapian::termcount Xapian::PostingIterator::get_wdf  )  const
 

Get the within document frequency of the document at the current position in the postlist.

Xapian::docid Xapian::PostingIterator::operator *  )  const
 

Get the document id at the current position in the postlist.

void Xapian::PostingIterator::operator= const PostingIterator other  ) 
 

Assignment is allowed.

The internals are reference counted, so assignment is also cheap.


Friends And Related Function Documentation

bool operator== const PostingIterator a,
const PostingIterator b
[friend]
 

Test equality of two PostingIterators.


Member Data Documentation

Xapian::Internal::RefCntPtr<Internal> Xapian::PostingIterator::internal
 

Reference counted internals.


The documentation for this class was generated from the following file:
Documentation for Xapian (version 0.8.4).
Generated on 8 Dec 2004 by Doxygen 1.3.8.