6 #ifndef REACTOR_FACTORY_H
7 #define REACTOR_FACTORY_H
15 class ReactorFactory :
public Factory<ReactorBase>
18 static ReactorFactory* factory() {
19 std::unique_lock<std::mutex> lock(reactor_mutex);
21 s_factory =
new ReactorFactory;
26 virtual void deleteFactory() {
27 std::unique_lock<std::mutex> lock(reactor_mutex);
42 virtual ReactorBase*
newReactor(
const std::string& reactorType);
52 void reg_type(
const std::string& name,
const int type) {
59 std::unordered_map<int, std::string> m_types;
62 static ReactorFactory* s_factory;
63 static std::mutex reactor_mutex;
70 return ReactorFactory::factory()->newReactor(model);
File contains the FactoryBase class declarations.
Base class for stirred reactors.
Namespace for the Cantera kernel.
ReactorBase * newReactor(const std::string &model)
Create a Reactor object of the specified type.