Cantera  3.1.0b1
Loading...
Searching...
No Matches
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 [\@extension](../python/utilities.html#cantera.extension)
21//! in the Python documentation for more information.
22//!
23//! @since New in %Cantera 3.0
25{
26public:
27 void registerRateBuilders(const string& extensionName) override;
28
29 void registerRateBuilder(const string& moduleName,
30 const string& className, const string& rateName) override;
31
32 static void registerSelf();
33
34 void registerRateDataBuilder(const string& moduleName,
35 const string& className, const string& rateName) override;
36
37private:
38 PythonExtensionManager() = default;
39};
40
41}
42
43#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:595