Cantera 2.6.0
WallFactory.cpp
Go to the documentation of this file.
1//! @file WallFactory.cpp
2
3// This file is part of Cantera. See License.txt in the top-level directory or
4// at https://cantera.org/license.txt for license and copyright information.
5
8
9using namespace std;
10namespace Cantera
11{
12
13WallFactory* WallFactory::s_factory = 0;
14std::mutex WallFactory::wall_mutex;
15
16WallFactory::WallFactory()
17{
18 reg("Wall", []() { return new Wall(); });
19}
20
21WallBase* WallFactory::newWall(const std::string& wallType)
22{
23 return create(wallType);
24}
25
26}
Header file for base class WallBase.
WallBase * create(const std::string &name, Args... args)
Create an object using the object construction function corresponding to "name" and the provided cons...
Definition: FactoryBase.h:76
void reg(const std::string &name, std::function< WallBase *(Args...)> f)
Register a new object construction function.
Definition: FactoryBase.h:81
Base class for 'walls' (walls, pistons, etc.) connecting reactors.
Definition: Wall.h:25
virtual WallBase * newWall(const std::string &wallType)
Create a new wall by type name.
Definition: WallFactory.cpp:21
Namespace for the Cantera kernel.
Definition: AnyMap.h:29