NVIDIA Iray API Home  Up
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
mi::base::Plugin Class Referenceabstract

The abstract base class for plugins. More...

Inheritance diagram for mi::base::Plugin:
Inheritance graph
[legend]

Public Member Functions

virtual Sint32  get_plugin_system_version () const
  Returns the version of the plugin system used to compile this. More...
 
virtual const char *  get_name () const =0
  Returns the name of the plugin. More...
 
virtual const char *  get_type () const =0
  Returns the type of the plugin. More...
 
virtual Sint32  get_version () const
  Returns the version number of the plugin. More...
 
virtual const char *  get_compiler () const
  Returns the compiler used to compile the plugin. More...
 
virtual void  release ()=0
  Destroys the plugin instance. More...
 
virtual const char *  get_string_property (Sint32 index, const char **value)
  Returns a plugin property. More...
 

Detailed Description

The abstract base class for plugins.

Every plugin must be derived from this class. It provides some virtual functions which can be used to get information about the plugin. The get_type() function is used to be able to have different classes which are derived from mi::base::Plugin and provide different interfaces in addition to the interface defined by mi::base::Plugin.

Member Function Documentation

virtual const char* mi::base::Plugin::get_compiler ( ) const
inlinevirtual

Returns the compiler used to compile the plugin.

virtual const char* mi::base::Plugin::get_name ( ) const
pure virtual

Returns the name of the plugin.

Implemented in mi::neuraylib::IVideo_plugin, and mi::neuraylib::IImage_plugin.

virtual Sint32 mi::base::Plugin::get_plugin_system_version ( ) const
inlinevirtual

Returns the version of the plugin system used to compile this.

This can be useful when the plugin system is extended/changed at some point to be able to still support older plugins or at least to reject them. The only thing which must not be changed is that the first virtual function is this one.

Returns
The version number of the plugin system.
virtual const char* mi::base::Plugin::get_string_property ( Sint32  index,
const char **  value 
)
inlinevirtual

Returns a plugin property.

Plugin properties are represented as key-value pairs. The caller can iterate over all such existing pairs by calling with indexes starting at 0 and increasing by 1 until the call returns 0.

Parameters
index The index to query.
value The property value for index.
Returns
The property key for index.
virtual const char* mi::base::Plugin::get_type ( ) const
pure virtual

Returns the type of the plugin.

See the documentation of derived interfaces for possible values.

virtual Sint32 mi::base::Plugin::get_version ( ) const
inlinevirtual

Returns the version number of the plugin.

virtual void mi::base::Plugin::release ( )
pure virtual

Destroys the plugin instance.

This method should not be confused with mi::base::IInterface::release() which decrements the reference count. Plugins are not reference counted and this method here rather destroys the plugin instance.