RobWorkProject  23.9.11-
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | List of all members
Plugin Class Referenceabstract

an interface for defining dynamically loadable plugins that define extensions and extension points. More...

#include <Plugin.hpp>

Inherited by CSGEJSEnginePlugin, AnalyticGeometryPlugin, SimpleFingerPlugin, MathGLPlugin, ProximityStrategyPlugin, LuaPlugin, ChartViewPlugin, RWSImageLoaderPlugin, ODEPlugin, LuaPlugin, BtPlugin, and LuaPlugin.

Public Member Functions

virtual ~Plugin ()
 destructor
 
virtual std::vector< rw::core::Extension::DescriptorgetExtensionDescriptors ()=0
 get all extension descriptors of this plugin
 
virtual rw::core::Ptr< ExtensionmakeExtension (const std::string &id)=0
 get a specific extension using the unique extendion ID
 
virtual std::vector< std::string > getExtensionPointIDs ()
 get a list of extension point ids which this plugin define More...
 
template<class T >
rw::core::Ptr< T > makeExtension (const std::string &id)
 get a
 
const std::string & getId ()
 Get unique identifier of plugin. More...
 
const std::string & getName ()
 Get human readable identifier for the plugin. More...
 
const std::string & getVersion ()
 Get version of plugin. More...
 
const OSHandle * getHandle ()
 Get the low-level handle of the plugin (for internal use). More...
 

Static Public Member Functions

static rw::core::Ptr< Pluginload (const std::string &filename)
 Load the plugin given by filename. More...
 

Protected Member Functions

 Plugin (const std::string &id, const std::string &name, const std::string &version)
 constructor More...
 

Static Protected Member Functions

static void close (const OSHandle *handle)
 Close the plugin. More...
 

Detailed Description

an interface for defining dynamically loadable plugins that define extensions and extension points.

Constructor & Destructor Documentation

◆ Plugin()

Plugin ( const std::string &  id,
const std::string &  name,
const std::string &  version 
)
protected

constructor

Parameters
id[in] unique identifier of this plugin
name[in] Human readable identifier of this plugin
version[in] version of this plugin

Member Function Documentation

◆ close()

static void close ( const OSHandle *  handle)
staticprotected

Close the plugin.

Parameters
handle[in] the low-level handle of the plugin.

◆ getExtensionPointIDs()

virtual std::vector<std::string> getExtensionPointIDs ( )
virtual

get a list of extension point ids which this plugin define

Returns
list of extension points ids.

◆ getHandle()

const OSHandle* getHandle ( )

Get the low-level handle of the plugin (for internal use).

Returns
the handle.

◆ getId()

const std::string& getId ( )
inline

Get unique identifier of plugin.

Returns
the identifier.

◆ getName()

const std::string& getName ( )
inline

Get human readable identifier for the plugin.

Returns
the identifier.

◆ getVersion()

const std::string& getVersion ( )
inline

Get version of plugin.

Returns
the version.

◆ load()

static rw::core::Ptr<Plugin> load ( const std::string &  filename)
static

Load the plugin given by filename.

A filename with .xml extension will be loaded as a lazy plugin.

Notice that the smart pointer returned will automatically unload the plugin when there are no more references to the plugin.

Parameters
filename[in] the filename.
Returns
the plugin, or NULL if load failed.

The documentation for this class was generated from the following file: