Cantera
2.0
|
Factory class for thermodynamic property managers. More...
#include <ThermoFactory.h>
Public Member Functions | |
virtual void | deleteFactory () |
delete the static instance of this factory | |
virtual | ~ThermoFactory () |
Destructor doesn't do anything. | |
virtual ThermoPhase * | newThermoPhase (std::string model) |
Create a new thermodynamic property manager. | |
Static Public Member Functions | |
static ThermoFactory * | factory () |
Static function that creates a static instance of the factory. | |
static void | deleteFactories () |
static function that deletes all factories in the internal registry maintained in a static variable | |
Private Member Functions | |
ThermoFactory () | |
Private constructors prevents usage. | |
Static Private Attributes | |
static ThermoFactory * | s_factory = 0 |
static member of a single instance | |
static mutex_t | thermo_mutex |
Decl for locking mutex for thermo factory singleton. | |
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 59 of file ThermoFactory.h.
|
inlinevirtual |
Destructor doesn't do anything.
We do not delete statically created single instance of this class here, because it would create an infinite loop if destructor is called for that single instance.
Definition at line 88 of file ThermoFactory.h.
|
inlineprivate |
Private constructors prevents usage.
Definition at line 107 of file ThermoFactory.h.
Referenced by ThermoFactory::factory().
|
inlinestatic |
Static function that creates a static instance of the factory.
Definition at line 65 of file ThermoFactory.h.
References ThermoFactory::s_factory, ThermoFactory::thermo_mutex, and ThermoFactory::ThermoFactory().
Referenced by Cantera::newThermoPhase().
|
inlinevirtual |
delete the static instance of this factory
Implements FactoryBase.
Definition at line 74 of file ThermoFactory.h.
References ThermoFactory::s_factory, and ThermoFactory::thermo_mutex.
|
virtual |
Create a new thermodynamic property manager.
model | String to look up the model against |
Definition at line 97 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.
|
inlinestaticinherited |
static function that deletes all factories in the internal registry maintained in a static variable
Definition at line 28 of file FactoryBase.h.
References FactoryBase::s_vFactoryRegistry.
|
staticprivate |
static member of a single instance
Definition at line 104 of file ThermoFactory.h.
Referenced by ThermoFactory::deleteFactory(), and ThermoFactory::factory().
|
staticprivate |
Decl for locking mutex for thermo factory singleton.
Definition at line 107 of file ThermoFactory.h.
Referenced by ThermoFactory::deleteFactory(), and ThermoFactory::factory().