Base class for managing user-defined Cantera extensions written in other languages.
More...
#include <ExtensionManager.h>
Base class for managing user-defined Cantera extensions written in other languages.
- Since
- New in Cantera 3.0
Definition at line 35 of file ExtensionManager.h.
◆ registerRateBuilders()
virtual void registerRateBuilders |
( |
const string & |
extensionName | ) |
|
|
inlinevirtual |
◆ registerRateBuilder()
virtual void registerRateBuilder |
( |
const string & |
extensionName, |
|
|
const string & |
className, |
|
|
const string & |
rateName |
|
) |
| |
|
inlinevirtual |
Register a user-defined ReactionRate implementation with ReactionRateFactory.
- Parameters
-
extensionName | The name of the library/module containing the user-defined rate. For example, the module name for rates implemented in Python. |
className | The name of the rate in the user's code. For example, the Python class name |
rateName | The name used to construct a rate of this type using the newReactionRate() function or from a YAML input file |
Reimplemented in PythonExtensionManager.
Definition at line 53 of file ExtensionManager.h.
◆ registerRateDataBuilder()
virtual void registerRateDataBuilder |
( |
const string & |
extensionName, |
|
|
const string & |
className, |
|
|
const string & |
rateName |
|
) |
| |
|
inlinevirtual |
Register a user-defined ReactionData implementation.
- Parameters
-
extensionName | The name of the library/module containing the user-defined type. For example, the module name for rates implemented in Python. |
className | The name of the data object in the user's code. For example, the Python class name |
rateName | The name of the corresponding reaction rate type |
Reimplemented in PythonExtensionManager.
Definition at line 65 of file ExtensionManager.h.
◆ wrapReactionData()
Create an object in an external language that wraps the specified ReactionData object.
- Parameters
-
rateName | The name of the reaction rate type, which corresponds to the name used to register the wrapper generator using registerReactionDataLinker |
data | The ReactionData object to be wrapped |
Definition at line 16 of file ExtensionManager.cpp.
◆ wrapSolution()
Create an object in an external language that wraps the specified Solution object.
- Parameters
-
wrapperType | A name specifying the wrapper type, which corresponds to the name used to register the wrapper generator using registerSolutionLinker |
soln | The Solution object to be wrapped |
Definition at line 35 of file ExtensionManager.cpp.
◆ registerReactionDataLinker()
void registerReactionDataLinker |
( |
const string & |
rateName, |
|
|
const string & |
wrapperName, |
|
|
function< void(ReactionDataDelegator &)> |
link |
|
) |
| |
|
static |
Register a function that can be used to create wrappers for ReactionData objects in an external language and link them to the corresponding C++ object.
- Parameters
-
rateName | The name of the reaction rate type |
wrapperName | The name used for Solution wrappers to be used with this object, corresponding to a type registered with registerSolutionLinker(). |
link | Function that creates ReactionData wrapper and links it to the provided C++ object |
Definition at line 28 of file ExtensionManager.cpp.
◆ registerSolutionLinker()
void registerSolutionLinker |
( |
const string & |
wrapperName, |
|
|
function< shared_ptr< ExternalHandle >(shared_ptr< Solution >)> |
link |
|
) |
| |
|
static |
Register a function that can be used to create wrappers for Solution objects in an external language and link it to the corresponding C++ objects.
Definition at line 47 of file ExtensionManager.cpp.
◆ getSolutionWrapperType()
string getSolutionWrapperType |
( |
const string & |
userType | ) |
|
|
static |
◆ s_ReactionData_linkers
◆ s_Solution_linkers
◆ s_userTypeToWrapperType
map< string, string > s_userTypeToWrapperType = {} |
|
staticprotected |
The documentation for this class was generated from the following files: