BALL  1.4.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members
BALL::Comparator< T > Class Template Reference

#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
 

Detailed Description

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

Generic Comparator Class. It is used as a baseclass, providing a common interface.

Definition at line 21 of file comparator.h.

Constructor & Destructor Documentation

template<typename T >
BALL::Comparator< T >::Comparator ( )
inline

Default constructor

Definition at line 86 of file comparator.h.

template<typename T >
BALL::Comparator< T >::~Comparator ( )
inlinevirtual

Destructor

Definition at line 92 of file comparator.h.

Member Function Documentation

template<class T >
bool BALL::Comparator< T >::isEqual ( const T &  a,
const T &  b 
) const
inlinevirtual

Test if two values are equal.

Definition at line 98 of file comparator.h.

template<class T >
bool BALL::Comparator< T >::isGreater ( const T &  a,
const T &  b 
) const
inline

Test if a is greater then b.

Definition at line 133 of file comparator.h.

template<class T >
bool BALL::Comparator< T >::isGreaterOrEqual ( const T &  a,
const T &  b 
) const
inline

Test if a is greater or equal.

Definition at line 126 of file comparator.h.

template<class T >
bool BALL::Comparator< T >::isLess ( const T &  a,
const T &  b 
) const
inlinevirtual

Test if a is less then b.

Definition at line 112 of file comparator.h.

template<class T >
bool BALL::Comparator< T >::isLessOrEqual ( const T &  a,
const T &  b 
) const
inline

Test if a is less or equal.

Definition at line 119 of file comparator.h.

template<class T >
bool BALL::Comparator< T >::isNotEqual ( const T &  a,
const T &  b 
) const
inline

Test if two values are unequal.

Definition at line 105 of file comparator.h.

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

Compare two values. -1 is returned if a < b.

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

Definition at line 140 of file comparator.h.