Class PluginPtr


  • public class PluginPtr
    extends java.lang.Object
    Ptr stores a pointer and optionally takes ownership of the value.
    • Constructor Detail

      • PluginPtr

        public PluginPtr​(long cPtr,
                         boolean cMemoryOwn)
      • PluginPtr

        public PluginPtr()
        Default constructor yielding a NULL-pointer.
      • PluginPtr

        public PluginPtr​(Plugin ptr)
        Do not take ownership of ptr.

        ptr can be null.

        The constructor is implicit on purpose.
    • Method Detail

      • getCPtr

        public static long getCPtr​(PluginPtr obj)
      • delete

        public void delete()
      • deref

        public Plugin deref()
        The pointer stored in the object.
      • __ref__

        public Plugin __ref__()
        Dereferencing operator.
      • getDeref

        public Plugin getDeref()
        Member access operator.
      • equals

        public boolean equals​(Plugin p)
      • isShared

        public boolean isShared()
        check if this Ptr has shared ownership or none
        ownership
        Returns:
        true if Ptr has shared ownership, false if it has no ownership.
      • isNull

        public boolean isNull()
        checks if the pointer is null
        Returns:
        Returns true if the pointer is null
      • 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 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.