| Cantera 3.0.0

Loading...
Searching...
No Matches
WallFactory.h
Go to the documentation of this file.
1//! @file WallFactory.h
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
6#ifndef WALL_FACTORY_H
7#define WALL_FACTORY_H
8
9#include "cantera/base/FactoryBase.h"
10#include "cantera/zeroD/Wall.h"
11
12 namespace Cantera
13{
14
15//! Factory class to create WallBase objects
16//!
17//! This class is mainly used via the newWall3() function, for example:
18//!
19//! ```cpp
20//! shared_ptr<WallBase> piston = newWall3("Wall");
21//! ```
22 class WallFactory : public Factory<WallBase>
23{
24 public:
25 static WallFactory* factory();
26
27 void deleteFactory() override;
28
29 //! Create a new wall by type name.
30 /*!
31 * @param wallType the type to be created.
32 * @deprecated To be removed after %Cantera 3.0; replaceable by newWall3.
33 */
34 WallBase* newWall(const string& wallType);
35
36 private:
37 static WallFactory* s_factory;
38 static std::mutex wall_mutex;
39 WallFactory();
40};
41
42//! @defgroup wallGroup Walls
43//! Zero-dimensional objects adjacent to reactors.
44//! Wall objects should be instantiated via the newWall3() function, for
45//! example:
46//!
47//! ```cpp
48//! shared_ptr<WallBase> piston = newWall3("Wall");
49//! ```
50//! @ingroup zerodGroup
51//! @{
52
53//! Create a WallBase object of the specified type
54//! @deprecated To be changed after %Cantera 3.0; for new behavior, see newWall3().
55 WallBase* newWall(const string& model);
56
57//! Create a WallBase object of the specified type
58//! @since New in %Cantera 3.0.
59//! @todo Transition back to newWall() after %Cantera 3.0
60 shared_ptr<WallBase> newWall3(const string& model);
61
62//! @}
63
64}
65
66#endif
FactoryBase.h
File contains the FactoryBase class declarations.
Wall.h
Header file for base class WallBase.
Cantera::Factory
Factory class that supports registering functions to create objects.
Definition FactoryBase.h:69
Cantera::WallBase
Base class for 'walls' (walls, pistons, etc.) connecting reactors.
Definition Wall.h:22
Cantera::WallFactory
Factory class to create WallBase objects.
Definition WallFactory.h:23
Cantera::WallFactory::deleteFactory
void deleteFactory() override
Virtual abstract function that deletes the factory.
Definition WallFactory.cpp:28
Cantera::WallFactory::newWall
WallBase * newWall(const string &wallType)
Create a new wall by type name.
Definition WallFactory.cpp:34
Cantera::newWall3
shared_ptr< WallBase > newWall3(const string &model)
Create a WallBase object of the specified type.
Definition WallFactory.cpp:48
Cantera::newWall
WallBase * newWall(const string &model)
Create a WallBase object of the specified type.
Definition WallFactory.cpp:41
Cantera
Namespace for the Cantera kernel.
Definition AnyMap.cpp:564