#include <BALL/CONCEPT/comparator.h>
Public Member Functions | |
Constructors and Destructors | |
Comparator () | |
virtual | ~Comparator () |
Predicates | |
virtual bool | isEqual (const T &a, const T &b) const |
bool | isNotEqual (const T &a, const T &b) const |
virtual bool | isLess (const T &a, const T &b) const |
bool | isLessOrEqual (const T &a, const T &b) const |
bool | isGreaterOrEqual (const T &a, const T &b) const |
bool | isGreater (const T &a, const T &b) const |
int | operator() (const T &a, const T &b) const |
Generic Comparator Class. It is used as a baseclass, providing a common interface.
BALL::Comparator< T >::Comparator | ( | ) | [inline] |
Default constructor
BALL::Comparator< T >::~Comparator | ( | ) | [inline, virtual] |
Destructor
bool BALL::Comparator< T >::isEqual | ( | const T & | a, | |
const T & | b | |||
) | const [inline, virtual] |
Test if two values are equal.
Referenced by BALL::Comparator< T >::isNotEqual(), and BALL::Comparator< T >::operator()().
bool BALL::Comparator< T >::isGreater | ( | const T & | a, | |
const T & | b | |||
) | const [inline] |
Test if a is greater then b.
References BALL::Comparator< T >::isLess().
bool BALL::Comparator< T >::isGreaterOrEqual | ( | const T & | a, | |
const T & | b | |||
) | const [inline] |
Test if a is greater or equal.
References BALL::Comparator< T >::isLess().
bool BALL::Comparator< T >::isLess | ( | const T & | a, | |
const T & | b | |||
) | const [inline, virtual] |
Test if a is less then b.
Referenced by BALL::Comparator< T >::isGreater(), BALL::Comparator< T >::isGreaterOrEqual(), BALL::Comparator< T >::isLessOrEqual(), and BALL::Comparator< T >::operator()().
bool BALL::Comparator< T >::isLessOrEqual | ( | const T & | a, | |
const T & | b | |||
) | const [inline] |
Test if a is less or equal.
References BALL::Comparator< T >::isLess().
bool BALL::Comparator< T >::isNotEqual | ( | const T & | a, | |
const T & | b | |||
) | const [inline] |
Test if two values are unequal.
References BALL::Comparator< T >::isEqual().
int BALL::Comparator< T >::operator() | ( | const T & | a, | |
const T & | b | |||
) | const [inline] |
Compare two values. -1 is returned if a < b.
References BALL::Comparator< T >::isEqual(), and BALL::Comparator< T >::isLess().