10#ifndef THERMO_FACTORY_H
11#define THERMO_FACTORY_H
44 const std::string& thermoModel) :
47 " does not match any known type.") {
49 "Unused. To be removed after Cantera 2.6.");
108inline shared_ptr<ThermoPhase>
newThermo(
const std::string& model)
111 return shared_ptr<ThermoPhase> (tptr);
132ThermoPhase*
newPhase(XML_Node& phase);
142unique_ptr<ThermoPhase>
newPhase(
const AnyMap& phaseNode,
143 const AnyMap& rootNode=AnyMap());
159ThermoPhase*
newPhase(
const std::string& infile, std::string
id=
"");
228void setupPhase(ThermoPhase& phase,
const AnyMap& phaseNode,
229 const AnyMap& rootNode=AnyMap());
251 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 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
static ThermoFactory * factory()
Static function that creates a static instance of the factory.
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 &phase, const AnyMap &phaseNode, const AnyMap &rootNode=AnyMap())
Initialize a ThermoPhase object.
ThermoPhase * newThermoPhase(const std::string &model)
Create a new thermodynamic property manager.
shared_ptr< ThermoPhase > newThermo(const std::string &model)
Create a new ThermoPhase instance.
void warn_deprecated(const std::string &source, const AnyBase &node, const std::string &message)
A deprecation warning for syntax in an input file.
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.
Classes providing support for XML data files.