6 #ifndef FLOWDEVICE_FACTORY_H
7 #define FLOWDEVICE_FACTORY_H
15 class FlowDeviceFactory :
public Factory<FlowDevice>
18 static FlowDeviceFactory* factory() {
19 std::unique_lock<std::mutex> lock(flowDevice_mutex);
21 s_factory =
new FlowDeviceFactory;
26 virtual void deleteFactory() {
27 std::unique_lock<std::mutex> lock(flowDevice_mutex);
42 virtual FlowDevice*
newFlowDevice(
const std::string& flowDeviceType);
52 void reg_type(
const std::string& name,
const int type) {
59 std::unordered_map<int, std::string> m_types;
62 static FlowDeviceFactory* s_factory;
63 static std::mutex flowDevice_mutex;
70 return FlowDeviceFactory::factory()->newFlowDevice(model);
File contains the FactoryBase class declarations.
Base class for 'flow devices' (valves, pressure regulators, etc.) connecting reactors.
Namespace for the Cantera kernel.
FlowDevice * newFlowDevice(const std::string &model)
Create a FlowDevice object of the specified type.