12WallFactory* WallFactory::s_factory = 0;
13std::mutex WallFactory::wall_mutex;
15WallFactory::WallFactory()
17 reg(
"Wall", []() {
return new Wall(); });
20WallFactory* WallFactory::factory() {
21 std::unique_lock<std::mutex> lock(wall_mutex);
23 s_factory =
new WallFactory;
29 std::unique_lock<std::mutex> lock(wall_mutex);
37 "To be removed after Cantera 3.0; for new behavior, see 'newWall3'.");
44 "To be changed after Cantera 3.0; for new behavior, see 'newWall3'.");
45 return WallFactory::factory()->newWall(model);
48shared_ptr<WallBase>
newWall3(
const string& model)
50 shared_ptr<WallBase> wptr(WallFactory::factory()->create(model));
Header file for base class WallBase.
WallBase * create(const string &name, Args... args)
Create an object using the object construction function corresponding to "name" and the provided cons...
void reg(const string &name, function< WallBase *(Args...)> f)
Register a new object construction function.
Base class for 'walls' (walls, pistons, etc.) connecting reactors.
void deleteFactory() override
Virtual abstract function that deletes the factory.
WallBase * newWall(const string &wallType)
Create a new wall by type name.
shared_ptr< WallBase > newWall3(const string &model)
Create a WallBase object of the specified type.
WallBase * newWall(const string &model)
Create a WallBase object of the specified type.
Namespace for the Cantera kernel.
void warn_deprecated(const string &source, const AnyBase &node, const string &message)
A deprecation warning for syntax in an input file.