ThermoFactory Class Reference
[Thermodynamic Properties]

Factory class for thermodynamic property managers. More...

#include <ThermoFactory.h>

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

List of all members.

Public Member Functions

virtual void deleteFactory ()
 delete the static instance of this factory
virtual ~ThermoFactory ()
 Destructor doesn't do anything.
virtual ThermoPhasenewThermoPhase (std::string model)
 Create a new thermodynamic property manager.

Static Public Member Functions

static ThermoFactoryfactory ()
 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 ThermoFactorys_factory = 0
 static member of a single instance
static boost::mutex thermo_mutex
 Decl for locking mutex for thermo factory singelton.

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 68 of file ThermoFactory.h.


Constructor & Destructor Documentation

virtual ~ThermoFactory (  )  [inline, virtual]

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 98 of file ThermoFactory.h.

ThermoFactory (  )  [inline, private]

Private constructors prevents usage.

Definition at line 117 of file ThermoFactory.h.


Member Function Documentation

static void deleteFactories (  )  [inline, static, inherited]

static function that deletes all factories in the internal registry maintained in a static variable

Definition at line 33 of file FactoryBase.h.

References FactoryBase::s_vFactoryRegistry.

Referenced by Cantera::appdelete().

virtual void deleteFactory (  )  [inline, virtual]

delete the static instance of this factory

Implements FactoryBase.

Definition at line 82 of file ThermoFactory.h.

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

static ThermoFactory* factory (  )  [inline, static]

Static function that creates a static instance of the factory.

Definition at line 73 of file ThermoFactory.h.

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

Referenced by Cantera::newThermoPhase().

ThermoPhase * newThermoPhase ( std::string  model  )  [virtual]

Create a new thermodynamic property manager.

Parameters:
model String 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 113 of file ThermoFactory.cpp.


Member Data Documentation

ThermoFactory * s_factory = 0 [static, private]

static member of a single instance

Definition at line 114 of file ThermoFactory.h.

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

boost::mutex thermo_mutex [static, private]

Decl for locking mutex for thermo factory singelton.

Definition at line 117 of file ThermoFactory.h.

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


The documentation for this class was generated from the following files:
Generated by  doxygen 1.6.3