Cantera  3.1.0a1
ExtensionManagerFactory Class Reference

A factory class for creating ExtensionManager objects. More...

#include <ExtensionManagerFactory.h>

Inheritance diagram for ExtensionManagerFactory:
[legend]

Detailed Description

A factory class for creating ExtensionManager objects.

Since
New in Cantera 3.0

Definition at line 18 of file ExtensionManagerFactory.h.

Public Member Functions

void deleteFactory () override
 Delete the static instance of this factory. More...
 
- Public Member Functions inherited from Factory< ExtensionManager >
ExtensionManagercreate (const string &name, Args... args)
 Create an object using the object construction function corresponding to "name" and the provided constructor arguments. More...
 
void reg (const string &name, function< ExtensionManager *(Args...)> f)
 Register a new object construction function. More...
 
void addAlias (const string &original, const string &alias)
 Add an alias for an existing registered type. More...
 
string canonicalize (const string &name)
 Get the canonical name registered for a type. More...
 
bool exists (const string &name) const
 Returns true if name is registered with this factory. More...
 
- Public Member Functions inherited from FactoryBase
virtual ~FactoryBase ()
 destructor More...
 

Static Public Member Functions

static shared_ptr< ExtensionManagerbuild (const string &extensionType)
 Create a new ExtensionManager. More...
 
static ExtensionManagerFactoryfactory ()
 Static function that returns the static instance of the factory, creating it if necessary. More...
 
- 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 More...
 

Private Member Functions

 ExtensionManagerFactory ()=default
 Private constructor prevents direct usage. More...
 

Static Private Attributes

static ExtensionManagerFactorys_factory = 0
 static member of the single factory instance More...
 
static std::mutex s_mutex
 Decl for locking mutex for thermo factory singleton. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Factory< ExtensionManager >
void addDeprecatedAlias (const string &original, const string &alias)
 Add a deprecated alias for an existing registered type. More...
 
- Protected Member Functions inherited from FactoryBase
 FactoryBase ()
 Constructor. More...
 

Constructor & Destructor Documentation

◆ ExtensionManagerFactory()

ExtensionManagerFactory ( )
privatedefault

Private constructor prevents direct usage.

Member Function Documentation

◆ build()

static shared_ptr<ExtensionManager> build ( const string &  extensionType)
inlinestatic

Create a new ExtensionManager.

Definition at line 22 of file ExtensionManagerFactory.h.

◆ deleteFactory()

void deleteFactory ( )
overridevirtual

Delete the static instance of this factory.

Implements FactoryBase.

Definition at line 25 of file ExtensionManagerFactory.cpp.

◆ factory()

ExtensionManagerFactory & factory ( )
static

Static function that returns the static instance of the factory, creating it if necessary.

Definition at line 16 of file ExtensionManagerFactory.cpp.

Member Data Documentation

◆ s_factory

ExtensionManagerFactory * s_factory = 0
staticprivate

static member of the single factory instance

Definition at line 35 of file ExtensionManagerFactory.h.

◆ s_mutex

mutex s_mutex
staticprivate

Decl for locking mutex for thermo factory singleton.

Definition at line 41 of file ExtensionManagerFactory.h.


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