#include <Cmp.hh>
The main usage of the Cmp class is if several variables should be checked for ordering in which case several Cmp objects can be combined as follows: cmp(a1, a2) || cmp(b1, b2) || cmp(c1, c2)
where cmp is a global function for easy creation of Cmp objects.
Definition at line 24 of file Cmp.hh.
Public Types | |
enum | CmpState { undefined = -2, ordered = -1, equivalent = 0, unordered = 1 } |
Enumerate the possible states of a Cmp object. More... | |
Public Member Functions | |
operator int () const | |
Automatically convert to an integer. | |
template<typename U> | |
const Cmp< T > & | operator|| (const Cmp< U > &c) const |
If this state is equivalent, set this state to the state of c. | |
Standard constructors and destructors. | |
Cmp (const T &t1, const T &t2) | |
The default constructor. | |
template<typename U> | |
Cmp (const Cmp< U > &) | |
The copy constructor. | |
~Cmp () | |
The destructor is not virtual since this is not intended to be a base class. | |
template<typename U> | |
const Cmp< T > & | operator= (const Cmp< U > &) |
The assignment operator. |
|
Enumerate the possible states of a Cmp object.
|
|
The default constructor.
|
|
The copy constructor.
|
|
The destructor is not virtual since this is not intended to be a base class.
|
|
Automatically convert to an integer.
|
|
The assignment operator.
|
|
If this state is equivalent, set this state to the state of c.
|