![]() |
ImFusion C++ SDK 4.4.0
|
#include <ImFusion/Base/ImFusionLibPlugin.h>
Specialized interface for a plugin for the ImFusionLib. More...
Specialized interface for a plugin for the ImFusionLib.
In addition to the base interface it provides the setApplicationController() member function that can be called by host applications with an ApplicationController so that plugins get access to it.
// instantiate necessary factories and register them with FactoryRegistry m_algFactory = std::make_unique<MyAlgorithmFactory>(); m_algCtrlFactory = std::make_unique<MyAlgorithmControllerFactory>(); registerFactories(m_algFactory.get(), m_algCtrlFactory.get(), nullptr);
// perform registration of further factories etc. [...]
return Status::Success; } ```
Public Member Functions | |
| virtual void | setApplicationController (ApplicationController &) |
| Gives the plugin access to the application controller. | |
| 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. | |
| virtual std::string | author () const =0 |
| Name of the author of the plugin for informative purposes. | |
| virtual std::string | description () const =0 |
| Description of the plugin purpose/functionality for informative purposes. | |
| 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. | |
Protected Member Functions | |
| 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. | |
| Protected Member Functions inherited from ImFusion::PluginBase | |
| virtual Status | init ()=0 |
| Perform plugin initialization, for instance by populating factories and registering custom types with the host application. | |
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... | |
|
inlinevirtual |
Gives the plugin access to the application controller.
Plugins should not rely on this method being called in all setups.
Reimplemented in ImFusion::PythonPlugin.