12 WallFactory* WallFactory::s_factory = 0;
13 std::mutex WallFactory::wall_mutex;
15 WallFactory::WallFactory()
17 reg(
"Wall", []() {
return new Wall(); });
20 WallFactory* 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);
34 shared_ptr<WallBase>
newWall(
const string& model)
36 return shared_ptr<WallBase>(WallFactory::factory()->create(model));
39 shared_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.