Public Types | Public Member Functions | Protected Attributes

ACE_Pair< T1, T2 > Class Template Reference

Defines a pair. More...

#include <Pair_T.h>

Collaboration diagram for ACE_Pair< T1, T2 >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef T1 first_type
typedef T2 second_type

Public Member Functions

 ACE_Pair (const T1 &t1, const T2 &t2)
 Constructor.
 ACE_Pair (void)
 Default constructor.
T1 & first (void)
 Get first.
const T1 & first (void) const
void first (const T1 &t1)
 Set first.
T2 & second (void)
 Get second.
const T2 & second (void) const
void second (const T2 &t2)
 Set second.
bool operator== (const ACE_Pair< T1, T2 > &rhs) const

Protected Attributes

T1 first_
 First.
T2 second_
 Second.

Detailed Description

template<class T1, class T2>
class ACE_Pair< T1, T2 >

Defines a pair.

Similar to the STL pair.

Definition at line 34 of file Pair_T.h.


Member Typedef Documentation

template<class T1, class T2>
typedef T1 ACE_Pair< T1, T2 >::first_type

Definition at line 39 of file Pair_T.h.

template<class T1, class T2>
typedef T2 ACE_Pair< T1, T2 >::second_type

Definition at line 40 of file Pair_T.h.


Constructor & Destructor Documentation

template<class T1, class T2>
ACE_Pair< T1, T2 >::ACE_Pair ( const T1 &  t1,
const T2 &  t2 
)

Constructor.

Definition at line 8 of file Pair_T.inl.

  : first_ (t1),
    second_ (t2)
{
}

template<class T1, class T2>
ACE_Pair< T1, T2 >::ACE_Pair ( void   ) 

Default constructor.

Definition at line 16 of file Pair_T.inl.

{
}


Member Function Documentation

template<class T1 , class T2 >
T1 & ACE_Pair< T1, T2 >::first ( void   ) 

Get first.

Definition at line 21 of file Pair_T.inl.

{
  return this->first_;
}

template<class T1 , class T2 >
const T1 & ACE_Pair< T1, T2 >::first ( void   )  const

Definition at line 27 of file Pair_T.inl.

{
  return this->first_;
}

template<class T1, class T2 >
void ACE_Pair< T1, T2 >::first ( const T1 &  t1  ) 

Set first.

Definition at line 33 of file Pair_T.inl.

{
  this->first_ = t1;
}

template<class T1, class T2>
bool ACE_Pair< T1, T2 >::operator== ( const ACE_Pair< T1, T2 > &  rhs  )  const

Definition at line 57 of file Pair_T.inl.

{
  return (this->first_ == rhs.first_ &&
          this->second_ == rhs.second_);
}

template<class T1 , class T2 >
T2 & ACE_Pair< T1, T2 >::second ( void   ) 

Get second.

Definition at line 39 of file Pair_T.inl.

{
  return this->second_;
}

template<class T1 , class T2>
void ACE_Pair< T1, T2 >::second ( const T2 &  t2  ) 

Set second.

Definition at line 51 of file Pair_T.inl.

{
  this->second_ = t2;
}

template<class T1 , class T2 >
const T2 & ACE_Pair< T1, T2 >::second ( void   )  const

Definition at line 45 of file Pair_T.inl.

{
  return this->second_;
}


Member Data Documentation

template<class T1, class T2>
T1 ACE_Pair< T1, T2 >::first_ [protected]

First.

Definition at line 69 of file Pair_T.h.

template<class T1, class T2>
T2 ACE_Pair< T1, T2 >::second_ [protected]

Second.

Definition at line 72 of file Pair_T.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines