Cantera  2.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Attributes | List of all members
ThermoFactory Class Reference

Factory class for thermodynamic property managers. More...

#include <ThermoFactory.h>

Inheritance diagram for ThermoFactory:
[legend]
Collaboration diagram for ThermoFactory:
[legend]

Public Member Functions

virtual void deleteFactory ()
 delete the static instance of this factory More...
 
virtual ThermoPhasenewThermoPhase (const std::string &model)
 Create a new thermodynamic property manager. More...
 
- Public Member Functions inherited from FactoryBase
virtual ~FactoryBase ()
 destructor More...
 

Static Public Member Functions

static ThermoFactoryfactory ()
 Static function that creates a static instance of the factory. More...
 
- Static Public Member Functions inherited from FactoryBase
static void deleteFactories ()
 static function that deletes all factories in the internal registry maintained in a static variable More...
 

Private Member Functions

 ThermoFactory ()
 Private constructors prevents usage. More...
 

Static Private Attributes

static ThermoFactorys_factory = 0
 static member of a single instance More...
 
static mutex_t thermo_mutex
 Decl for locking mutex for thermo factory singleton. More...
 

Additional Inherited Members

- Protected Member Functions inherited from FactoryBase
 FactoryBase ()
 Constructor. More...
 

Detailed Description

Factory class for thermodynamic property managers.

This class keeps a list of the known ThermoPhase classes, and is used to create new instances of these classes.

Definition at line 58 of file ThermoFactory.h.

Constructor & Destructor Documentation

ThermoFactory ( )
inlineprivate

Private constructors prevents usage.

Definition at line 96 of file ThermoFactory.h.

Referenced by ThermoFactory::factory().

Member Function Documentation

static ThermoFactory* factory ( )
inlinestatic

Static function that creates a static instance of the factory.

Definition at line 64 of file ThermoFactory.h.

References ThermoFactory::s_factory, ThermoFactory::thermo_mutex, and ThermoFactory::ThermoFactory().

Referenced by Cantera::newThermoPhase().

virtual void deleteFactory ( )
inlinevirtual

delete the static instance of this factory

Implements FactoryBase.

Definition at line 73 of file ThermoFactory.h.

References ThermoFactory::s_factory, and ThermoFactory::thermo_mutex.

ThermoPhase * newThermoPhase ( const std::string &  model)
virtual

Create a new thermodynamic property manager.

Parameters
modelString to look up the model against
Returns
Returns a pointer to a new ThermoPhase instance matching the model string. Returns NULL if something went wrong. Throws an exception UnknownThermoPhaseModel if the string wasn't matched.

Definition at line 93 of file ThermoFactory.cpp.

References Cantera::_itypes, Cantera::_types, Cantera::cDebyeHuckel, Cantera::cEdge, Cantera::cFixedChemPot, Cantera::cHMW, Cantera::cIdealGas, Cantera::cIdealMolalSoln, Cantera::cIdealSolidSolnPhase, Cantera::cMetal, Cantera::cSurf, Cantera::cVPSS_IdealGas, and Cantera::ntypes.

Member Data Documentation

ThermoFactory * s_factory = 0
staticprivate

static member of a single instance

Definition at line 93 of file ThermoFactory.h.

Referenced by ThermoFactory::deleteFactory(), and ThermoFactory::factory().

mutex_t thermo_mutex
staticprivate

Decl for locking mutex for thermo factory singleton.

Definition at line 96 of file ThermoFactory.h.

Referenced by ThermoFactory::deleteFactory(), and ThermoFactory::factory().


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