Cantera
3.1.0a1
|
Factory class to construct reaction rate calculators. More...
#include <ReactionRateFactory.h>
Factory class to construct reaction rate calculators.
The reaction factory is accessed through the static method factory:
Definition at line 56 of file ReactionRateFactory.h.
Public Member Functions | |
void | deleteFactory () override |
Virtual abstract function that deletes the factory. More... | |
Public Member Functions inherited from Factory< ReactionRate, const AnyMap &, const UnitStack & > | |
ReactionRate * | create (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< ReactionRate *(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 ReactionRateFactory * | factory () |
Return a pointer to the factory. 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 | |
ReactionRateFactory () | |
default constructor, which is defined as private More... | |
Static Private Attributes | |
static ReactionRateFactory * | s_factory = 0 |
Pointer to the single instance of the factory. More... | |
static std::mutex | rate_mutex |
Mutex for use when calling the factory. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from Factory< ReactionRate, const AnyMap &, const UnitStack & > | |
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... | |
|
private |
default constructor, which is defined as private
Definition at line 26 of file ReactionRateFactory.cpp.
|
static |
Return a pointer to the factory.
On the first call, a new instance is created. Since there is no need to instantiate more than one factory, on all subsequent calls, a pointer to the existing factory is returned.
Definition at line 103 of file ReactionRateFactory.cpp.
|
overridevirtual |
Virtual abstract function that deletes the factory.
This must be properly defined in child objects.
Implements FactoryBase.
Definition at line 111 of file ReactionRateFactory.cpp.
|
staticprivate |
Pointer to the single instance of the factory.
Definition at line 71 of file ReactionRateFactory.h.
|
staticprivate |
Mutex for use when calling the factory.
Definition at line 77 of file ReactionRateFactory.h.