Simple Application Framework  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Member Functions | Public Attributes
Saf::Collection::Pair< T1, T2 > Class Template Reference

A pair of values which may be of a different data type. More...

#include <Pair.h>

Inheritance diagram for Saf::Collection::Pair< T1, T2 >:
Saf::Collection::Triplet< T1, T2, T3 >

List of all members.

Public Types

typedef T1 FirstMemberType
 First member type.
typedef T2 SecondMemberType
 Second member type.

Public Member Functions

 Pair ()
 Default constructor.
 Pair (const T1 &v1)
 Constructor.
 Pair (const T1 &v1, const T2 &v2)
 Constructor.
 Pair (const Pair< T1, T2 > &p)
 Copy constructor.
Pair< T1, T2 > & operator= (const Pair< T1, T2 > &p)
 Assignment operator.
void Swap (Pair< T1, T2 > &p)
 Swap the content of two pairs.

Public Attributes

T1 m_first
 First element.
T2 m_second
 Second element.

Detailed Description

template<class T1, class T2>
class Saf::Collection::Pair< T1, T2 >

A pair of values which may be of a different data type.

See also:
Saf::Algo::SelectFirst, Saf::Algo::SelectSecond.

Member Typedef Documentation

template<class T1, class T2>
typedef T1 Saf::Collection::Pair< T1, T2 >::FirstMemberType

First member type.

template<class T1, class T2>
typedef T2 Saf::Collection::Pair< T1, T2 >::SecondMemberType

Second member type.


Constructor & Destructor Documentation

template<class T1, class T2>
Saf::Collection::Pair< T1, T2 >::Pair ( ) [inline]

Default constructor.

template<class T1, class T2>
Saf::Collection::Pair< T1, T2 >::Pair ( const T1 &  v1) [inline, explicit]

Constructor.

The second member is constructed using its default constructor.

template<class T1, class T2>
Saf::Collection::Pair< T1, T2 >::Pair ( const T1 &  v1,
const T2 &  v2 
) [inline]

Constructor.

template<class T1, class T2>
Saf::Collection::Pair< T1, T2 >::Pair ( const Pair< T1, T2 > &  p) [inline]

Copy constructor.


Member Function Documentation

template<class T1, class T2>
Pair<T1,T2>& Saf::Collection::Pair< T1, T2 >::operator= ( const Pair< T1, T2 > &  p) [inline]

Assignment operator.

template<class T1, class T2>
void Saf::Collection::Pair< T1, T2 >::Swap ( Pair< T1, T2 > &  p) [inline]

Swap the content of two pairs.


Member Data Documentation

template<class T1, class T2>
T1 Saf::Collection::Pair< T1, T2 >::m_first

First element.

template<class T1, class T2>
T2 Saf::Collection::Pair< T1, T2 >::m_second

Second element.


The documentation for this class was generated from the following file: