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
10#include "cantera/zeroD/Wall.h"
11
12namespace 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//! ```
22class WallFactory : public Factory<WallBase>
23{
24public:
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
36private:
37 static WallFactory* s_factory;
38 static std::mutex wall_mutex;
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().
55WallBase* 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
60shared_ptr<WallBase> newWall3(const string& model);
61
62//! @}
63
64}
65
66#endif
File contains the FactoryBase class declarations.
Header file for base class WallBase.
Factory class that supports registering functions to create objects.
Definition FactoryBase.h:69
Base class for 'walls' (walls, pistons, etc.) connecting reactors.
Definition Wall.h:22
Factory class to create WallBase objects.
Definition WallFactory.h:23
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.
Definition AnyMap.cpp:564