FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

Tuple2< Type1, Type2 > Class Template Reference

A 2-tuple. More...

#include <OpenFOAM/Tuple2.H>


Detailed Description

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

A 2-tuple.

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

Definition at line 76 of file Tuple2.H.

Inheritance diagram for Tuple2< Type1, Type2 >:
Collaboration diagram for Tuple2< Type1, Type2 >:

List of all members.

Public Member Functions

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

Friends

bool  operator== (const Tuple2< Type1, Type2 > &a, const Tuple2< Type1, Type2 > &b)
bool  operator!= (const Tuple2< Type1, Type2 > &a, const Tuple2< Type1, Type2 > &b)
Istream &  operator>> (Istream &is, Tuple2< Type1, Type2 > &t2)
 Read Tuple2 from Istream, discarding contents of existing Tuple2.
Ostream &  operator (Ostream &os, const Tuple2< Type1, Type2 > &t2)

Constructor & Destructor Documentation

Tuple2 (  ) [inline]

Null constructor for lists.

Definition at line 89 of file Tuple2.H.

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

Construct from components.

Definition at line 93 of file Tuple2.H.

Tuple2 ( Istream &   is  ) [inline]

Construct from Istream.

Definition at line 100 of file Tuple2.H.


Member Function Documentation

Type1& first (  ) [inline]

Return first.

Definition at line 115 of file Tuple2.H.

Type2& second (  ) [inline]

Return second.

Definition at line 127 of file Tuple2.H.

Tuple2<Type2, Type1> reverseTuple2 (  ) const [inline]

Return reverse pair.

Definition at line 133 of file Tuple2.H.


Friends And Related Function Documentation

bool operator== ( const Tuple2< Type1, Type2 > &   a,
const Tuple2< Type1, Type2 > &   b  
) [friend]
bool operator!= ( const Tuple2< Type1, Type2 > &   a,
const Tuple2< Type1, Type2 > &   b  
) [friend]
Istream& operator>> ( Istream &   is,
Tuple2< Type1, Type2 > &   t2  
) [friend]

Read Tuple2 from Istream, discarding contents of existing Tuple2.

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

The documentation for this class was generated from the following file:
  • src/OpenFOAM/primitives/Tuple2/Tuple2.H