3#ifndef CT_EXTENSIONMANAGER_H
4#define CT_EXTENSIONMANAGER_H
23 ExternalHandle(
const ExternalHandle&) =
delete;
24 virtual ~ExternalHandle() =
default;
54 const string& className,
const string& rateName)
66 const string& className,
const string& rateName)
85 static shared_ptr<ExternalHandle>
wrapSolution(
const string& wrapperType,
86 shared_ptr<Solution> soln);
102 function<shared_ptr<ExternalHandle>(shared_ptr<Solution>)> link);
Base class for managing user-defined Cantera extensions written in other languages.
static void registerSolutionLinker(const string &wrapperName, function< shared_ptr< ExternalHandle >(shared_ptr< Solution >)> link)
Register a function that can be used to create wrappers for Solution objects in an external language ...
static void wrapReactionData(const string &rateName, ReactionDataDelegator &data)
Create an object in an external language that wraps the specified ReactionData object.
static map< string, string > s_userTypeToWrapperType
Mapping from user-defined rate types to Solution wrapper types.
virtual void registerRateBuilders(const string &extensionName)
Register ReactionRate defined in a user extension with ReactionRateFactory.
virtual void registerRateDataBuilder(const string &extensionName, const string &className, const string &rateName)
Register a user-defined ReactionData implementation.
virtual void registerRateBuilder(const string &extensionName, const string &className, const string &rateName)
Register a user-defined ReactionRate implementation with ReactionRateFactory.
static string getSolutionWrapperType(const string &userType)
Get the Solution wrapper type corresponding to the specified user-defined reaction rate type.
static void registerReactionDataLinker(const string &rateName, const string &wrapperName, function< void(ReactionDataDelegator &)> link)
Register a function that can be used to create wrappers for ReactionData objects in an external langu...
static map< string, function< shared_ptr< ExternalHandle >(shared_ptr< Solution >)> > s_Solution_linkers
Functions for wrapping and linking Solution objects.
static shared_ptr< ExternalHandle > wrapSolution(const string &wrapperType, shared_ptr< Solution > soln)
Create an object in an external language that wraps the specified Solution object.
static map< string, function< void(ReactionDataDelegator &)> > s_ReactionData_linkers
Functions for wrapping and linking ReactionData objects.
virtual void * get()
Get the underlying external object.
An error indicating that an unimplemented function has been called.
Delegate methods of the ReactionData class to external functions.
A container class for chemically-reacting solutions.
Definitions for the classes that are thrown when Cantera experiences an error condition (also contain...
Namespace for the Cantera kernel.