ThermoRefPair< ThermoType > Class Template Reference

Class containing a pair of thermo references. Handles down-casting to more specific thermo types by constructing one pair from another (e.g., constructing a multicomponentThermo reference pair from a basicThermo pair). Tracks validity of the references. More...

Inheritance diagram for ThermoRefPair< ThermoType >:

Public Member Functions

 ThermoRefPair (const objectRegistry &db, const Pair< word > &phaseNames)
 Construct from a database and phase names. More...
 
template<class BasicThermoType >
 ThermoRefPair (const ThermoRefPair< BasicThermoType > basicThermos)
 Construct by casting a more primitive thermo type. More...
 
const Pair< bool > & valid () const
 Access the validity flags. More...
 
const ThermoType & first () const
 Access the first thermo. More...
 
const ThermoType & second () const
 Access the second thermo. More...
 
const ThermoType & operator[] (const label i) const
 Access a thermo by index. More...
 

Detailed Description

template<class ThermoType>
class Foam::ThermoRefPair< ThermoType >

Class containing a pair of thermo references. Handles down-casting to more specific thermo types by constructing one pair from another (e.g., constructing a multicomponentThermo reference pair from a basicThermo pair). Tracks validity of the references.

Definition at line 50 of file ThermoRefPair.H.

Constructor & Destructor Documentation

◆ ThermoRefPair() [1/2]

ThermoRefPair ( const objectRegistry db,
const Pair< word > &  phaseNames 
)
inline

Construct from a database and phase names.

Definition at line 69 of file ThermoRefPair.H.

◆ ThermoRefPair() [2/2]

ThermoRefPair ( const ThermoRefPair< BasicThermoType >  basicThermos)
inline

Construct by casting a more primitive thermo type.

Definition at line 102 of file ThermoRefPair.H.

Member Function Documentation

◆ valid()

const Pair<bool>& valid ( ) const
inline

Access the validity flags.

Definition at line 127 of file ThermoRefPair.H.

◆ first()

const ThermoType& first ( ) const
inline

Access the first thermo.

Definition at line 133 of file ThermoRefPair.H.

Referenced by ThermoRefPair< ThermoType >::operator[]().

Here is the caller graph for this function:

◆ second()

const ThermoType& second ( ) const
inline

Access the second thermo.

Definition at line 139 of file ThermoRefPair.H.

Referenced by ThermoRefPair< ThermoType >::operator[]().

Here is the caller graph for this function:

◆ operator[]()

const ThermoType& operator[] ( const label  i) const
inline

Access a thermo by index.

Definition at line 148 of file ThermoRefPair.H.

References ThermoRefPair< ThermoType >::first(), and ThermoRefPair< ThermoType >::second().

Here is the call graph for this function:

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