Tuple2< Type1, Type2 > Class Template Reference

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

Inheritance diagram for Tuple2< Type1, Type2 >:

Classes

class  Hash
 Hashing function class. More...
 

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...
 
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 Tuple2.H.

Constructor & Destructor Documentation

◆ Tuple2() [1/3]

Tuple2 ( )
inline

Null constructor for lists.

Definition at line 99 of file Tuple2.H.

◆ Tuple2() [2/3]

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

Construct from components.

Definition at line 103 of file Tuple2.H.

◆ Tuple2() [3/3]

Tuple2 ( Istream is)
inline

Construct from Istream.

Definition at line 110 of file Tuple2.H.

Member Function Documentation

◆ first() [1/2]

◆ first() [2/2]

Type1& first ( )
inline

Return first.

Definition at line 125 of file Tuple2.H.

◆ second() [1/2]

◆ second() [2/2]

Type2& second ( )
inline

Return second.

Definition at line 137 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 208 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 93 of file Tuple2.H.


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