ImFusion C++ SDK 4.4.0
ImFusion::ImFusionPlugin Class Referenceabstract

#include <ImFusion/Base/ImFusionPlugin.h>

Base class for plugins that can be loaded by the ImFusion SDK. More...

Inheritance diagram for ImFusion::ImFusionPlugin:

Detailed Description

Base class for plugins that can be loaded by the ImFusion SDK.

This base class defines the interface so that the ImFusionLib and the plugin can interact with each other (e.g. add algorithm factories). If you need to do any initialization work (e.g. populate additional factories) you should do this in the constructor.

Note
In order to be discoverable by the ImFusionLib you must further export an ImFusion::ImFusionPlugin* createPlugin() C function that instantiates your derived class. This can be easily done with the IMFUSION_REGISTER_PLUGIN() macro.

MyExamplePlugin.h

#include <ImFusion/Base/ImFusionPlugin.h>
class MyExamplePlugin : public ImFusion::ImFusionPlugin {
...
};
Base class for plugins that can be loaded by the ImFusion SDK.
Definition ImFusionPlugin.h:73

MyExamplePlugin.cpp

#include <MyExamplePlugin.h>
...
#define IMFUSION_REGISTER_PLUGIN(...)
Helper macro to conveniently define and export the necessary functions and symbols for an ImFusion pl...
Definition Plugin.h:52
See also
Deprecated
"Use ImFusionLibPlugin instead"

Public Member Functions

virtual const AlgorithmFactorygetAlgorithmFactory ()=0
 Get algorithm factory for algorithms hosted by plugin.
virtual const AlgorithmControllerFactorygetAlgorithmControllerFactory ()=0
 Get algorithm controller factory for algorithms hosted by plugin.
virtual const DataAnnotationFactorygetDataAnnotationFactory ()
 Get data GL annotation factory for annotations hosted by plugin.
virtual std::string pluginName () const
 Return the name of the plugin.
virtual std::vector< WorkspaceConversionFunctiongetWorkspaceConversionFunctions ()
 Return a list of workspace conversion functions and the corresponding workspace versions they apply to.
Public Member Functions inherited from ImFusion::ImFusionLibPlugin
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::stringdependencies () const
 Optional list of plugin IDs on which this plugin depends.

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...
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.
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.

Member Function Documentation

◆ getAlgorithmFactory()

virtual const AlgorithmFactory * ImFusion::ImFusionPlugin::getAlgorithmFactory ( )
pure virtual

Get algorithm factory for algorithms hosted by plugin.

Implemented in ImFusion::Robotics::RoboticsPlugin.

◆ getAlgorithmControllerFactory()

virtual const AlgorithmControllerFactory * ImFusion::ImFusionPlugin::getAlgorithmControllerFactory ( )
pure virtual

Get algorithm controller factory for algorithms hosted by plugin.

Implemented in ImFusion::Robotics::RoboticsPlugin.

◆ pluginName()

virtual std::string ImFusion::ImFusionPlugin::pluginName ( ) const
inlinevirtual

Return the name of the plugin.

Note
When implementing this method, make sure to use a unique identifier to avoid conflicts with other plugins.

Reimplemented in ImFusion::Robotics::RoboticsPlugin.


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