Cantera  3.1.0a1
ReactorFactory Class Reference

Factory class to create reactor objects. More...

#include <ReactorFactory.h>

Inheritance diagram for ReactorFactory:
[legend]

Detailed Description

Factory class to create reactor objects.

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

shared_ptr<ReactorBase> r1 = newReactor("IdealGasReactor");
shared_ptr< ReactorBase > newReactor(const string &model)
Create a Reactor object of the specified type.

Definition at line 22 of file ReactorFactory.h.

Public Member Functions

void deleteFactory () override
 Virtual abstract function that deletes the factory. More...
 
- Public Member Functions inherited from Factory< ReactorBase >
ReactorBasecreate (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< ReactorBase *(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 ReactorFactoryfactory ()
 
- 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...
 

Static Private Attributes

static ReactorFactorys_factory = 0
 
static std::mutex reactor_mutex
 

Additional Inherited Members

- Protected Member Functions inherited from Factory< ReactorBase >
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...
 

Member Function Documentation

◆ deleteFactory()

void deleteFactory ( )
overridevirtual

Virtual abstract function that deletes the factory.

This must be properly defined in child objects.

Implements FactoryBase.

Definition at line 63 of file ReactorFactory.cpp.


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