FreeFOAM The Cross-Platform CFD Toolkit
Tuple< Type1, Type2 > Class Template Reference

A 2 Tuple. Differs from Tuple in that the two elements can be different type. More...


Detailed Description

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

A 2 Tuple. Differs from Tuple in that the two elements can be different type.

Definition at line 61 of file Tuple.H.

List of all members.

Public Member Functions

 Tuple ()
 Null constructor for lists.
 Tuple (const Type1 &first, const Type2 &second)
 Construct from components.
 Tuple (Istream &is)
 Construct from Istream.
Type1 first () const
 Return first.
Type1 & first ()
 Return first.
Type2 second () const
 Return second.
Type2 & second ()
 Return second.
Tuple< Type1, Type2 > reverseTuple () const
 Return reverse pair.

Friends

bool operator== (const Tuple< Type1, Type2 > &a, const Tuple< Type1, Type2 > &b)
bool operator!= (const Tuple< Type1, Type2 > &a, const Tuple< Type1, Type2 > &b)
Istreamoperator>> (Istream &is, Tuple< Type1, Type2 > &p)
Ostreamoperator (Ostream &os, const Tuple< Type1, Type2 > &p)

Constructor & Destructor Documentation

Tuple ( )
inline

Null constructor for lists.

Definition at line 74 of file Tuple.H.

Tuple ( const Type1 &  first,
const Type2 &  second 
)
inline

Construct from components.

Definition at line 78 of file Tuple.H.

Tuple ( Istream is)
inline

Construct from Istream.

Definition at line 85 of file Tuple.H.

References IOstream::check(), Istream::readBegin(), and Istream::readEnd().


Member Function Documentation

Type1 first ( ) const
inline

Return first.

Definition at line 103 of file Tuple.H.

Type1& first ( )
inline

Return first.

Definition at line 109 of file Tuple.H.

Type2 second ( ) const
inline

Return second.

Definition at line 115 of file Tuple.H.

Type2& second ( )
inline

Return second.

Definition at line 121 of file Tuple.H.

Tuple<Type1, Type2> reverseTuple ( ) const
inline

Return reverse pair.

Definition at line 127 of file Tuple.H.


Friends And Related Function Documentation

bool operator== ( const Tuple< Type1, Type2 > &  a,
const Tuple< Type1, Type2 > &  b 
)
friend

Definition at line 136 of file Tuple.H.

bool operator!= ( const Tuple< Type1, Type2 > &  a,
const Tuple< Type1, Type2 > &  b 
)
friend

Definition at line 148 of file Tuple.H.

Istream& operator>> ( Istream is,
Tuple< Type1, Type2 > &  p 
)
friend
Ostream& operator ( Ostream os,
const Tuple< Type1, Type2 > &  p 
)
friend

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