| Cantera 3.0.0

Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Static Private Attributes | List of all members
WallFactory Class Reference

Factory class to create WallBase objects. More...

`#include <WallFactory.h>`

Inheritance diagram for WallFactory:
[legend]

## Detailed Description

Factory class to create WallBase objects.

This class is mainly used via the newWall3() function, for example:

shared_ptr<WallBase> piston = newWall3("Wall");
Cantera::newWall3
shared_ptr< WallBase > newWall3(const string &model)
Create a WallBase object of the specified type.
Definition WallFactory.cpp:48

Definition at line 22 of file WallFactory.h.

## Public Member Functions
void | deleteFactory () override
| Virtual abstract function that deletes the factory.
WallBase * | newWall (const string &wallType)
| Create a new wall by type name.
Public Member Functions inherited from Factory< WallBase >
WallBase * | create (const string &name, Args... args)
| Create an object using the object construction function corresponding to "name" and the provided constructor arguments.
void | reg (const string &name, function< WallBase *(Args...)> f)
| Register a new object construction function.
void | addAlias (const string &original, const string &alias)
| Add an alias for an existing registered type.
string | canonicalize (const string &name)
| Get the canonical name registered for a type.
bool | exists (const string &name) const
| Returns true if `name` is registered with this factory.
Public Member Functions inherited from FactoryBase
virtual | ~FactoryBase ()
| destructor

## Static Public Member Functions
static WallFactory * | factory ()
Static Public Member Functions inherited from FactoryBase
static void | deleteFactories ()
| static function that deletes all factories in the internal registry maintained in a static variable

## Static Private Attributes
static WallFactory * | s_factory = 0
static std::mutex | wall_mutex

## Additional Inherited Members
Protected Member Functions inherited from Factory< WallBase >
void | addDeprecatedAlias (const string &original, const string &alias)
| Add a deprecated alias for an existing registered type.
Protected Member Functions inherited from FactoryBase
| FactoryBase ()
| Constructor.

## Constructor & Destructor Documentation

## ◆ WallFactory()

WallFactory | ( |  | ) |
| private

Definition at line 15 of file WallFactory.cpp.

## Member Function Documentation

## ◆ factory()

WallFactory * factory | ( |  | ) |
| static

Definition at line 20 of file WallFactory.cpp.

## ◆ deleteFactory()

void deleteFactory | ( |  | ) |
| override virtual

Virtual abstract function that deletes the factory.

This must be properly defined in child objects.

Implements FactoryBase.

Definition at line 28 of file WallFactory.cpp.

## ◆ newWall()

WallBase * newWall | ( | const string & | wallType | ) |

Create a new wall by type name.

Parameters

  wallType | the type to be created.

Deprecated:
  To be removed after Cantera 3.0; replaceable by newWall3.

Definition at line 34 of file WallFactory.cpp.

## Member Data Documentation

## ◆ s_factory

WallFactory * s_factory = 0
| static private

Definition at line 37 of file WallFactory.h.

## ◆ wall_mutex

std::mutex wall_mutex
| static private

Definition at line 38 of file WallFactory.h.

The documentation for this class was generated from the following files:

- WallFactory.h
- WallFactory.cpp