![]() |
ImFusion C++ SDK 4.4.0
|
#include <ImFusion/Python/PythonPlugin.h>
Enables Python bindings for the ImFusionLib. More...
Enables Python bindings for the ImFusionLib.
Starts an embedded Python interpreter when loaded and imports the 'imfusion' module. The Python version of the interpreter depends on the activeEnvironment configured in PythonPluginSettings.
Public Member Functions | |
| std::string | author () const override |
| Name of the author of the plugin for informative purposes. | |
| std::string | description () const override |
| Description of the plugin purpose/functionality for informative purposes. | |
| void | setApplicationController (ApplicationController &app) override |
| Gives the plugin access to the application controller. | |
| bool | isInterpreterRunning () const |
| Returns if an interpreter was started successfully and Python is available. | |
| PythonInterpreterInterface * | interpreter () const |
| Returns the embedded interpreter or nullptr. | |
| Public Member Functions inherited from ImFusion::PluginBase | |
| std::string | pluginId () const |
| Convenience function to query the plugin ID of a concrete instance at runtime. | |
| PluginManager::PluginStatus | pluginStatus () const |
| Convenience function to query the plugin status of a concrete instance at runtime. | |
| Utils::Version | version () const |
| Convenience function to query the version number of the plugin for informative purposes. | |
| virtual std::vector< std::string > | dependencies () const |
| Optional list of plugin IDs on which this plugin depends. | |
Static Public Member Functions | |
| static const char * | id () |
Protected Member Functions | |
| Status | init () override |
| Perform plugin initialization, for instance by populating factories and registering custom types with the host application. | |
| Protected Member Functions inherited from ImFusion::ImFusionLibPlugin | |
| bool | isLicensed (const std::string &entitlementName) const |
| Helper function to check whether entitlementName is included in the currently activated license. | |
| void | registerFactories (std::unique_ptr< AlgorithmFactory > algorithmFactory, std::unique_ptr< AlgorithmControllerFactory > controllerFactory, std::unique_ptr< DataAnnotationFactory > annotationFactory) |
| Helper function to register the given factories with the FactoryRegistry. | |
Additional Inherited Members | |
| Public Types inherited from ImFusion::PluginBase | |
| enum class | Status { Success = 0 , LicenseCheckFailed , Unsupported , UnknownError } |
| Enumeration of status codes for plugin initialization. More... | |
|
inlineoverridevirtual |
Name of the author of the plugin for informative purposes.
Implements ImFusion::PluginBase.
|
inlineoverridevirtual |
Description of the plugin purpose/functionality for informative purposes.
Implements ImFusion::PluginBase.
|
overridevirtual |
Gives the plugin access to the application controller.
Plugins should not rely on this method being called in all setups.
Reimplemented from ImFusion::ImFusionLibPlugin.
| PythonInterpreterInterface * ImFusion::PythonPlugin::interpreter | ( | ) | const |
Returns the embedded interpreter or nullptr.
The interpreter is owned by the plugin and is deleted when the plugin is unloaded.
|
overrideprotectedvirtual |
Perform plugin initialization, for instance by populating factories and registering custom types with the host application.
Implements ImFusion::PluginBase.