|
| operator CmpState () const |
| Automatically convert to an enum.
|
|
| operator int () const |
| Automatically convert to an integer.
|
|
template<typename U > |
const Cmp< Projection > & | operator|| (const Cmp< U > &c) const |
| If this state is equivalent, set this state to the state of c.
|
|
|
| Cmp (const Projection &p1, const Projection &p2) |
| The default constructor.
|
|
template<typename U > |
| Cmp (const Cmp< U > &x) |
| The copy constructor.
|
|
| ~Cmp () |
| The destructor is not virtual since this is not intended to be a base class.
|
|
template<typename U > |
const Cmp< Projection > & | operator= (const Cmp< U > &x) |
| The assignment operator.
|
|
template<>
class Rivet::Cmp< Projection >
Specialization of Cmp for checking the ordering of two {Projection}s.
Specialization of the Cmp helper class to be used when checking the ordering of two Projection objects. When implicitly converted to an integer the value will be negative if the two objects used in the constructor are ordered and positive if they are not. Zero will be returned if they are equal. This specialization uses directly the virtual compare() function in the Projection class.
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.