Package org.robwork.sdurw_core
Class Plugin
- java.lang.Object
-
- org.robwork.sdurw_core.Plugin
-
public class Plugin extends java.lang.Objectthis define is to be used whenever dynamically loadable RobWork libraries are
being created. Simply add this in the bottom of the .cpp file which defines you plugin.
RW_ADD_PLUGIN(MyPluginName)
where MyPluginName is the name of your plugin including namespace. So if your plugin is
named: "rw::example::MyExamplePlugin" then you should use the complete name.
an interface for defining dynamically loadable plugins that define extensions and
extension points.
-
-
Constructor Summary
Constructors Constructor Description Plugin(long cPtr, boolean cMemoryOwn)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddelete()static longgetCPtr(Plugin obj)SWIGTYPE_p_std__vectorT_rw__core__Extension__Descriptor_tgetExtensionDescriptors()get all extension descriptors of this pluginvector_sgetExtensionPointIDs()get a list of extension point ids which this plugin defineSWIGTYPE_p_rw__core__Plugin__OSHandlegetHandle()Get the low-level handle of the plugin (for internal use).java.lang.StringgetId()Get unique identifier of plugin.java.lang.StringgetName()Get human readable identifier for the plugin.java.lang.StringgetVersion()Get version of plugin.static PluginPtrload(java.lang.String filename)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.
ExtensionPtrmakeExtension(java.lang.String id)get a specific extension using the unique extendion ID
-
-
-
Method Detail
-
getCPtr
public static long getCPtr(Plugin obj)
-
delete
public void delete()
-
getExtensionDescriptors
public SWIGTYPE_p_std__vectorT_rw__core__Extension__Descriptor_t getExtensionDescriptors()
get all extension descriptors of this plugin
-
makeExtension
public ExtensionPtr makeExtension(java.lang.String id)
get a specific extension using the unique extendion ID
-
getExtensionPointIDs
public vector_s getExtensionPointIDs()
get a list of extension point ids which this plugin define- Returns:
- list of extension points ids.
-
getId
public java.lang.String getId()
Get unique identifier of plugin.- Returns:
- the identifier.
-
getName
public java.lang.String getName()
Get human readable identifier for the plugin.- Returns:
- the identifier.
-
getVersion
public java.lang.String getVersion()
Get version of plugin.- Returns:
- the version.
-
load
public static PluginPtr load(java.lang.String filename)
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.
-
getHandle
public SWIGTYPE_p_rw__core__Plugin__OSHandle getHandle()
Get the low-level handle of the plugin (for internal use).- Returns:
- the handle.
-
-