Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

OmMSetIterator Class Reference

An iterator pointing to items in an MSet. More...

#include <omenquire.h>

List of all members.

Public Types

typedef std::input_iterator_tag iterator_category
typedef om_docid value_type
typedef om_doccount_diff difference_type
typedef om_docidpointer
typedef om_docidreference

Public Methods

 OmMSetIterator ()
 Create an uninitialised iterator; this cannot be used, but is convenient syntactically. More...

 ~OmMSetIterator ()
 OmMSetIterator (const OmMSetIterator &other)
 Copying is allowed (and is cheap). More...

void operator= (const OmMSetIterator &other)
 Assignment is allowed (and is cheap). More...

OmMSetIterator & operator++ ()
 Advance the iterator. More...

void operator++ (int)
om_docid operator * () const
 Get the document ID for the current position. More...

OmDocument get_document () const
 Get an OmDocument object for the current position. More...

om_doccount get_rank () const
 Get the rank of the document at the current position. More...

om_weight get_weight () const
 Get the weight of the document at the current position. More...

om_percent get_percent () const
 This returns the weight of the document as a percentage score The return value will be in the range 0 to 100: 0 meaning that the item did not match the query at all. More...

std::string get_description () const
 Returns a string describing this object. More...


Public Attributes

Internal * internal

Friends

class OmMSet
bool operator== (const OmMSetIterator &a, const OmMSetIterator &b)


Detailed Description

An iterator pointing to items in an MSet.

This is used for access to individual results of a match.


Constructor & Destructor Documentation

OmMSetIterator::OmMSetIterator  
 

Create an uninitialised iterator; this cannot be used, but is convenient syntactically.

OmMSetIterator::OmMSetIterator const OmMSetIterator &    other
 

Copying is allowed (and is cheap).


Member Function Documentation

std::string OmMSetIterator::get_description   const
 

Returns a string describing this object.

Introspection method.

OmDocument OmMSetIterator::get_document   const
 

Get an OmDocument object for the current position.

This method returns an OmDocument object which provides the information about the document pointed to by the MSetIterator.

If the underlying database has suitable support, using this call (rather than asking the database for a document based on its document ID) will enable the system to ensure that the correct data is returned, and that the document has not been deleted or changed since the query was performed.

Parameters:
it  The OmMSetIterator for which to retrieve the data.
Returns:
An OmDocument object containing the document data.
Exceptions:
OmDocNotFoundError  The document specified could not be found in the database.

om_percent OmMSetIterator::get_percent   const
 

This returns the weight of the document as a percentage score The return value will be in the range 0 to 100: 0 meaning that the item did not match the query at all.

om_doccount OmMSetIterator::get_rank   const
 

Get the rank of the document at the current position.

The rank is the position that this document is at in the ordered list of results of the query. The document judged "most relevant" will have rank of 0.

om_weight OmMSetIterator::get_weight   const
 

Get the weight of the document at the current position.

om_docid OmMSetIterator::operator *   const
 

Get the document ID for the current position.

OmMSetIterator& OmMSetIterator::operator++  
 

Advance the iterator.

void OmMSetIterator::operator= const OmMSetIterator &    other
 

Assignment is allowed (and is cheap).


The documentation for this class was generated from the following file:
Documentation for Xapian (version 0.6.3).
Generated on 14 Dec 2002 by Doxygen 1.2.15.