|
Cantera
2.4.0
|
Factory class to construct falloff function calculators. More...
#include <FalloffFactory.h>
Public Member Functions | |
| virtual void | deleteFactory () |
| Virtual abstract function that deletes the factory. More... | |
| virtual Falloff * | newFalloff (int type, const vector_fp &c) |
| Return a pointer to a new falloff function calculator. More... | |
Public Member Functions inherited from Factory< Falloff > | |
| Falloff * | create (std::string name, Args... args) |
| Create an object using the object construction function corresponding to "name" and the provided constructor arguments. More... | |
| void | reg (const std::string &name, std::function< Falloff *(Args...)> f) |
| Register a new object construction function. More... | |
Public Member Functions inherited from FactoryBase | |
| virtual | ~FactoryBase () |
| destructor More... | |
Static Public Member Functions | |
| static FalloffFactory * | 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 | |
| FalloffFactory () | |
| default constructor, which is defined as private More... | |
Static Private Attributes | |
| static FalloffFactory * | s_factory = 0 |
| Pointer to the single instance of the factory. More... | |
| static std::mutex | falloff_mutex |
| Mutex for use when calling the factory. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from FactoryBase | |
| FactoryBase () | |
| Constructor. More... | |
Protected Attributes inherited from Factory< Falloff > | |
| std::unordered_map< std::string, std::function< Falloff *(Args...)> > | m_creators |
| std::unordered_map< std::string, std::string > | m_synonyms |
| Map of synonyms to canonical names. More... | |
| std::unordered_map< std::string, std::string > | m_deprecated_names |
| Map of deprecated synonyms to canonical names. More... | |
Factory class to construct falloff function calculators.
The falloff factory is accessed through static method factory:
Definition at line 30 of file FalloffFactory.h.
|
private |
default constructor, which is defined as private
Definition at line 17 of file FalloffFactory.cpp.
References Factory< Falloff >::reg().
Referenced by FalloffFactory::factory().
|
inlinestatic |
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 38 of file FalloffFactory.h.
References FalloffFactory::falloff_mutex, FalloffFactory::FalloffFactory(), and FalloffFactory::s_factory.
Referenced by FalloffMgr::FalloffMgr().
|
inlinevirtual |
Virtual abstract function that deletes the factory.
This must be properly defined in child objects.
Implements FactoryBase.
Definition at line 46 of file FalloffFactory.h.
References FalloffFactory::falloff_mutex, and FalloffFactory::s_factory.
Return a pointer to a new falloff function calculator.
| type | Integer flag specifying the type of falloff function. The standard types are defined in file reaction_defs.h. A factory class derived from FalloffFactory may define other types as well. |
| c | input vector of doubles which populates the falloff parameterization. |
Definition at line 24 of file FalloffFactory.cpp.
|
staticprivate |
Pointer to the single instance of the factory.
Definition at line 66 of file FalloffFactory.h.
Referenced by FalloffFactory::deleteFactory(), and FalloffFactory::factory().
|
staticprivate |
Mutex for use when calling the factory.
Definition at line 72 of file FalloffFactory.h.
Referenced by FalloffFactory::deleteFactory(), and FalloffFactory::factory().
1.8.14