10 #ifndef THERMO_FACTORY_H
11 #define THERMO_FACTORY_H
42 const std::string& thermoModel) :
45 " does not match any known type.") {}
123 ThermoPhase*
newPhase(XML_Node& phase);
133 unique_ptr<ThermoPhase>
newPhase(AnyMap& phaseNode,
134 const AnyMap& rootNode=AnyMap());
150 ThermoPhase*
newPhase(
const std::string& infile, std::string
id=
"");
208 void importPhase(XML_Node& phase, ThermoPhase* th);
219 void setupPhase(ThermoPhase& phase, AnyMap& phaseNode,
220 const AnyMap& rootNode=AnyMap());
242 const XML_Node* phaseSpeciesData);
File contains the FactoryBase class declarations.
Header file for class ThermoPhase, the base class for phases with thermodynamic properties,...
Base class for exceptions thrown by Cantera classes.
Factory class that supports registering functions to create objects.
T * create(const std::string &name, Args... args)
Create an object using the object construction function corresponding to "name" and the provided cons...
Factory class for thermodynamic property managers.
ThermoFactory()
Private constructors prevents usage.
static ThermoFactory * factory()
Static function that creates a static instance of the factory.
static std::mutex thermo_mutex
Decl for locking mutex for thermo factory singleton.
virtual ThermoPhase * newThermoPhase(const std::string &model)
Create a new thermodynamic property manager.
virtual void deleteFactory()
delete the static instance of this factory
static ThermoFactory * s_factory
static member of a single instance
Base class for a phase with thermodynamic properties.
Specific error to be thrown if the type of Thermo manager is unrecognized.
UnknownThermoPhaseModel(const std::string &proc, const std::string &thermoModel)
Constructor.
void importPhase(XML_Node &phase, ThermoPhase *th)
Import a phase information into an empty ThermoPhase object.
Namespace for the Cantera kernel.
void setupPhase(ThermoPhase &thermo, AnyMap &phaseNode, const AnyMap &rootNode)
Initialize a ThermoPhase object.
const XML_Node * speciesXML_Node(const std::string &kname, const XML_Node *phaseSpeciesData)
Search an XML tree for species data.
void installElements(Phase &th, const XML_Node &phaseNode)
Add the elements given in an XML_Node tree to the specified phase.
ThermoPhase * newThermoPhase(const std::string &model)
Create a new thermo manager instance.
Classes providing support for XML data files.