ImFusion C++ SDK 4.4.0
ImFusion::PythonPlugin Class Reference

#include <ImFusion/Python/PythonPlugin.h>

Enables Python bindings for the ImFusionLib. More...

Inheritance diagram for ImFusion::PythonPlugin:

Detailed Description

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.
PythonInterpreterInterfaceinterpreter () 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::stringdependencies () 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...

Member Function Documentation

◆ author()

std::string ImFusion::PythonPlugin::author ( ) const
inlineoverridevirtual

Name of the author of the plugin for informative purposes.

Implements ImFusion::PluginBase.

◆ description()

std::string ImFusion::PythonPlugin::description ( ) const
inlineoverridevirtual

Description of the plugin purpose/functionality for informative purposes.

Implements ImFusion::PluginBase.

◆ setApplicationController()

void ImFusion::PythonPlugin::setApplicationController ( ApplicationController & )
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.

◆ interpreter()

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.

◆ init()

Status ImFusion::PythonPlugin::init ( )
overrideprotectedvirtual

Perform plugin initialization, for instance by populating factories and registering custom types with the host application.

Implements ImFusion::PluginBase.


The documentation for this class was generated from the following file:
  • ImFusion/Python/PythonPlugin.h
Search Tab / S to search, Esc to close