Classes | Public Member Functions | Static Public Member Functions | List of all members
Pair Class Reference

An ordered pair of two objects of type <T> with first() and second() elements. More...

Inheritance diagram for Pair:
Inheritance graph
[legend]

Classes

struct  symmHasher
 

Public Member Functions

 Pair ()=default
 
 Pair (const T &f, const T &s)
 
 Pair (T &&f, T &&s)
 
 Pair (const std::pair< T, T > &vals)
 
 Pair (std::pair< T, T > &&vals)
 
 Pair (const FixedList< T, 2 > &list)
 
 Pair (const T &f, const T &s, const bool doSort)
 
 Pair (const FixedList< T, 2 > &list, const bool doSort)
 
 Pair (Istream &is)
 
const Tsecond () const noexcept
 
Tsecond () noexcept
 
const Tother (const T &a) const
 
bool sorted () const
 
void flip ()
 
void sort ()
 

Static Public Member Functions

static int compare (const Pair< T > &a, const Pair< T > &b)
 

Detailed Description

An ordered pair of two objects of type <T> with first() and second() elements.

Source files
See also
Foam::Tuple2 for storing two objects of dissimilar types.

Definition at line 50 of file Pair.H.

Constructor & Destructor Documentation

◆ Pair() [1/9]

Pair ( )
default

◆ Pair() [2/9]

Pair ( const T f,
const T s 
)
inline

Definition at line 44 of file PairI.H.

◆ Pair() [3/9]

Pair ( T &&  f,
T &&  s 
)
inline

Definition at line 52 of file PairI.H.

◆ Pair() [4/9]

Pair ( const std::pair< T, T > &  vals)
inline

Definition at line 60 of file PairI.H.

◆ Pair() [5/9]

Pair ( std::pair< T, T > &&  vals)
inline

Definition at line 68 of file PairI.H.

◆ Pair() [6/9]

Pair ( const FixedList< T, 2 > &  list)
inline

Definition at line 76 of file PairI.H.

◆ Pair() [7/9]

Pair ( const T f,
const T s,
const bool  doSort 
)
inline

Definition at line 83 of file PairI.H.

◆ Pair() [8/9]

Pair ( const FixedList< T, 2 > &  list,
const bool  doSort 
)
inline

Definition at line 99 of file PairI.H.

◆ Pair() [9/9]

Pair ( Istream is)
inlineexplicit

Definition at line 106 of file PairI.H.

Member Function Documentation

◆ second() [1/2]

const T& second ( ) const
inlinenoexcept

◆ second() [2/2]

T& second ( )
inlinenoexcept

◆ other()

const T & other ( const T a) const
inline

Definition at line 129 of file PairI.H.

◆ sorted()

bool sorted ( ) const
inline

Definition at line 160 of file PairI.H.

◆ flip()

void flip ( )
inline

Definition at line 153 of file PairI.H.

Referenced by patchEdgeFaceRegions::updateEdge(), and patchEdgeFaceRegions::updateFace().

Here is the caller graph for this function:

◆ sort()

void sort ( )
inline

Definition at line 167 of file PairI.H.

◆ compare()

int compare ( const Pair< T > &  a,
const Pair< T > &  b 
)
inlinestatic

Definition at line 26 of file PairI.H.

Referenced by preserveBaffles::add(), and edge::compare().

Here is the caller graph for this function:

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