Xapian::MultiValueSorter Class Reference

Sorter subclass which sorts by a several values. More...

#include <sorter.h>

Inheritance diagram for Xapian::MultiValueSorter:

Inheritance graph
[legend]
Collaboration diagram for Xapian::MultiValueSorter:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 MultiValueSorter ()
template<class Iterator>
 MultiValueSorter (Iterator begin, Iterator end)
virtual std::string operator() (const Xapian::Document &doc) const
 This method takes a Document object and builds a sort key from it.
void add (Xapian::valueno valno, bool forward=true)
virtual ~MultiValueSorter ()

Private Attributes

std::vector< std::pair< Xapian::valueno,
bool > > 
valnos

Detailed Description

Sorter subclass which sorts by a several values.

Results are ordered by the first value. In the event of a tie, the second is used. If this is the same for both, the third is used, and so on.

Definition at line 51 of file sorter.h.


Constructor & Destructor Documentation

Xapian::MultiValueSorter::MultiValueSorter (  )  [inline]

Definition at line 55 of file sorter.h.

template<class Iterator>
Xapian::MultiValueSorter::MultiValueSorter ( Iterator  begin,
Iterator  end 
) [inline]

Definition at line 58 of file sorter.h.

Xapian::MultiValueSorter::~MultiValueSorter (  )  [virtual]

Definition at line 86 of file sorter.cc.


Member Function Documentation

string Xapian::MultiValueSorter::operator() ( const Xapian::Document doc  )  const [virtual]

This method takes a Document object and builds a sort key from it.

Documents are then ordered by a string compare on the sort keys.

Implements Xapian::Sorter.

Definition at line 35 of file sorter.cc.

References Xapian::Document::get_value(), rare, and valnos.

void Xapian::MultiValueSorter::add ( Xapian::valueno  valno,
bool  forward = true 
) [inline]

Definition at line 64 of file sorter.h.

Referenced by DEFINE_TESTCASE().


Member Data Documentation

std::vector<std::pair<Xapian::valueno, bool> > Xapian::MultiValueSorter::valnos [private]

Definition at line 52 of file sorter.h.

Referenced by operator()().


The documentation for this class was generated from the following files:
Documentation for Xapian (version 1.0.10).
Generated on 24 Dec 2008 by Doxygen 1.5.2.