Public Member Functions | Friends | List of all members
Tuple2< Type1, Type2 > Class Template Reference

A 2-tuple for storing two objects of different types. More...

Inheritance diagram for Tuple2< Type1, Type2 >:
Inheritance graph
[legend]

Public Member Functions

 Tuple2 ()
 Null constructor for lists. More...
 
 Tuple2 (const Type1 &f, const Type2 &s)
 Construct from components. More...
 
 Tuple2 (Istream &is)
 Construct from Istream. More...
 
const Type1 & first () const
 Return first. More...
 
Type1 & first ()
 Return first. More...
 
const Type2 & second () const
 Return second. More...
 
Type2 & second ()
 Return second. More...
 

Friends

Istreamoperator>> (Istream &is, Tuple2< Type1, Type2 > &t2)
 Read Tuple2 from Istream, discarding contents of existing Tuple2. More...
 
Ostreamoperator (Ostream &os, const Tuple2< Type1, Type2 > &t2)
 

Detailed Description

template<class Type1, class Type2>
class Foam::Tuple2< Type1, Type2 >

A 2-tuple for storing two objects of different types.

See also
Foam::Pair for storing two objects of identical types.

Definition at line 47 of file Tuple2.H.

Constructor & Destructor Documentation

Tuple2 ( )
inline

Null constructor for lists.

Definition at line 74 of file Tuple2.H.

Tuple2 ( const Type1 &  f,
const Type2 &  s 
)
inline

Construct from components.

Definition at line 78 of file Tuple2.H.

Tuple2 ( Istream is)
inline

Construct from Istream.

Definition at line 85 of file Tuple2.H.

Member Function Documentation

const Type1& first ( ) const
inline
Type1& first ( )
inline

Return first.

Definition at line 100 of file Tuple2.H.

const Type2& second ( ) const
inline
Type2& second ( )
inline

Return second.

Definition at line 112 of file Tuple2.H.

Friends And Related Function Documentation

Istream& operator>> ( Istream is,
Tuple2< Type1, Type2 > &  t2 
)
friend

Read Tuple2 from Istream, discarding contents of existing Tuple2.

Definition at line 167 of file Tuple2.H.

Ostream& operator ( Ostream os,
const Tuple2< Type1, Type2 > &  t2 
)
friend

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