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);
34shared_ptr<WallBase>
newWall(
const string& model)
36 return shared_ptr<WallBase>(WallFactory::factory()->create(model));
39shared_ptr<WallBase>
newWall3(
const string& model)
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)
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.