BALL::Comparator< T > Class Template Reference
[Miscellaneous]

Generic Comparator Class. More...

#include <comparator.h>

List of all members.


Public Member Functions

Constructors and Destructors
Comparator ()
Default constructor.
virtual ~Comparator ()
Destructor.
Predicates
virtual bool isEqual (const T &a, const T &b) const
Test if two values are equal.
bool isNotEqual (const T &a, const T &b) const
Test if two values are unequal.
virtual bool isLess (const T &a, const T &b) const
Test if a is less then b.
bool isLessOrEqual (const T &a, const T &b) const
Test if a is less or equal.
bool isGreaterOrEqual (const T &a, const T &b) const
Test if a is greater or equal.
bool isGreater (const T &a, const T &b) const
Test if a is greater then b.
int operator() (const T &a, const T &b) const
Compare two values.

Detailed Description

template<typename T>
class BALL::Comparator< T >

Generic Comparator Class.

It is used as a baseclass, providing a common interface.


Member Function Documentation

template<class T >
int BALL::Comparator< T >::operator() ( const T & a,
const T & b
) const

Compare two values.

-1 is returned if a < b.

0 is returned if a == b.
1 is returned if a > b.

References BALL::Comparator< T >::isEqual(), and BALL::Comparator< T >::isLess().


Generated on Thu Aug 6 18:30:25 2009 for BALL by doxygen 1.5.8