Comparator< T > Class Template Reference

#include <Comparator.h>

List of all members.


Detailed Description

template<class T>
class Comparator< T >

Default Comparator.

Public Member Functions

virtual ~Comparator ()
 virtual destructor
virtual int compare (const T &lhs, const T &rhs) const
 compares two variables of type T and indicates which one is smaller or if they are equal

Constructor & Destructor Documentation

template<class T>
virtual Comparator< T >::~Comparator (  )  [inline, virtual]

virtual destructor

00018     {}


Member Function Documentation

template<class T>
virtual int Comparator< T >::compare ( const T &  lhs,
const T &  rhs 
) const [inline, virtual]

compares two variables of type T and indicates which one is smaller or if they are equal

Parameters:
lhs first variable to compare
rhs second variable to compare
Returns:
-1 if rhs is smaller, 0 if lhs and rhs are equal and 1 if rhs is greater

Reimplemented in BaseLookup, KeyDistanceComparator< Metric >, and KeyDistanceComparator< KeyXorMetric >.

00030     {
00031         return lhs.compareTo(rhs);
00032     }


The documentation for this class was generated from the following file:
Generated on Thu Apr 17 13:19:28 2008 for ITM OverSim by  doxygen 1.5.3