PythonExtensionManager.h Source File#

Cantera: PythonExtensionManager.h Source File
PythonExtensionManager.h
Go to the documentation of this file.
1//! @file PythonExtensionManager.h
2
3#ifndef CT_PYTHONEXTENSIONMANAGER_H
4#define CT_PYTHONEXTENSIONMANAGER_H
5
6// This file is part of Cantera. See License.txt in the top-level directory or
7// at https://cantera.org/license.txt for license and copyright information.
8
10
11namespace Cantera
12{
13
14//! Class for managing user-defined %Cantera extensions written in Python
15//!
16//! Handles Python initialization if the main application is not the Python interpreter.
17//!
18//! Imports a user-specified module, which must be on the Python path and registers
19//! user-defined classes that are marked with the `@extension` decorator. See the
20//! documentation for
21//! <a href="../../sphinx/html/cython/utilities.html#cantera.extension">`@extension`</a>
22//! in the Python documentation for more information.
23//!
24//! @since New in %Cantera 3.0
26{
27public:
28 void registerRateBuilders(const string& extensionName) override;
29
30 void registerRateBuilder(const string& moduleName,
31 const string& className, const string& rateName) override;
32
33 static void registerSelf();
34
35 void registerRateDataBuilder(const string& moduleName,
36 const string& className, const string& rateName) override;
37
38private:
39 PythonExtensionManager() = default;
40};
41
42}
43
44#endif
Base class for managing user-defined Cantera extensions written in other languages.
Class for managing user-defined Cantera extensions written in Python.
void registerRateBuilder(const string &moduleName, const string &className, const string &rateName) override
Register a user-defined ReactionRate implementation with ReactionRateFactory.
void registerRateBuilders(const string &extensionName) override
Register ReactionRate defined in a user extension with ReactionRateFactory.
void registerRateDataBuilder(const string &moduleName, const string &className, const string &rateName) override
Register a user-defined ReactionData implementation.
Namespace for the Cantera kernel.
Definition AnyMap.cpp:564