Tuple2< Type1, Type2 > Class Template Reference

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

Inheritance diagram for Tuple2< Type1, Type2 >:

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...
 
template<>
const char *const typeName ("Tuple2<word,scalar>")
 

Static Public Attributes

static const char *const typeName
 

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 65 of file HashTable.H.

Constructor & Destructor Documentation

◆ Tuple2() [1/3]

Tuple2 ( )
inline

Null constructor for lists.

Definition at line 79 of file Tuple2.H.

◆ Tuple2() [2/3]

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

Construct from components.

Definition at line 83 of file Tuple2.H.

◆ Tuple2() [3/3]

Tuple2 ( Istream is)
inline

Construct from Istream.

Definition at line 90 of file Tuple2.H.

Member Function Documentation

◆ first() [1/2]

◆ first() [2/2]

Type1& first ( )
inline

Return first.

Definition at line 105 of file Tuple2.H.

◆ second() [1/2]

◆ second() [2/2]

Type2& second ( )
inline

Return second.

Definition at line 117 of file Tuple2.H.

◆ typeName()

const char *const typeName ( "Tuple2<word,scalar>"  )

Friends And Related Function Documentation

◆ operator>>

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

Read Tuple2 from Istream, discarding contents of existing Tuple2.

Definition at line 172 of file Tuple2.H.

◆ operator

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

Member Data Documentation

◆ typeName

const char* const typeName
static

Definition at line 73 of file Tuple2.H.


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