12WallFactory* WallFactory::s_factory = 0;
13std::mutex WallFactory::wall_mutex;
15WallFactory::WallFactory()
17 reg(
"Wall", [](
const string& name) {
return new Wall(name); });
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);
34shared_ptr<WallBase>
newWall(
const string& model,
const string& name)
36 return shared_ptr<WallBase>(WallFactory::factory()->create(model, name));
39shared_ptr<WallBase>
newWall3(
const string& model)
42 "Use newWall instead; to be removed after Cantera 3.1.");
Header file for base class WallBase.
void reg(const string &name, function< WallBase *(Args...)> f)
Register a new object construction function.
void deleteFactory() override
Virtual abstract function that deletes the factory.
shared_ptr< WallBase > newWall(const string &model, const string &name)
Create a WallBase object of the specified type.
shared_ptr< WallBase > newWall3(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.