OrderedPair holds two objects of the same arbitrary type. More...
#include <OrderedPair.h>
Public Types | |
| typedef T | Value |
| The value type. | |
|
typedef Loki::TypeTraits < Value >::ParameterType | ParameterType |
| The const parameter type. | |
| typedef std::pair< T, T > | Base |
| The base type is a pair. | |
Public Member Functions | |
| void | order () |
| Order the two elements. | |
Constructors etc. | |
| OrderedPair () | |
| Default constructor. | |
| OrderedPair (const OrderedPair &other) | |
| Copy constructor. | |
| OrderedPair & | operator= (const OrderedPair &other) |
| Assignment operator. | |
| ~OrderedPair () | |
| Trivial destructor. | |
| OrderedPair (const Value &a, const Value &b) | |
| Construct by copying the elements. | |
| template<typename T1 , typename T2 > | |
| OrderedPair (const std::pair< T1, T2 > &x) | |
| Construct from a pair of different types. | |
Accessors. | |
| ParameterType | getFirst () const |
| Return the first element. | |
| ParameterType | getSecond () const |
| Return the second element. | |
Manipulators. | |
| void | set (ParameterType x, ParameterType y) |
| Set the elements. | |
| void | setFirst (ParameterType x) |
| Set the first element. | |
| void | setSecond (ParameterType x) |
| Set the second element. | |
OrderedPair holds two objects of the same arbitrary type.
The objects are ordered so that the first precedes the second.
| OrderedPair< T >::OrderedPair | ( | ) | [inline] |
Default constructor.
Create the elements using their default constructors.
| void OrderedPair< T >::set | ( | ParameterType | x, | |
| ParameterType | y | |||
| ) | [inline] |
Set the elements.
| void OrderedPair< T >::setFirst | ( | ParameterType | x | ) | [inline] |
Set the first element.
| void OrderedPair< T >::setSecond | ( | ParameterType | x | ) | [inline] |
Set the second element.
1.6.3