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

Every plugin must be derived from this class. More...

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

Public Member Functions

virtual Sint32  get_plugin_system_version () const
  Get the version of the plugin system used to compile this. More...
 
virtual const char *  get_name () const =0
  Get the name of the plugin. More...
 
virtual const char *  get_type () const =0
  Get a type string for the plugin. More...
 
virtual Sint32  get_version () const
  Get the version of the plugin. More...
 
virtual const char *  get_compiler () const
  Get the compiler used to compile the plugin. More...
 
virtual void  release ()=0
  Release the plugin giving back all allocated resources. More...
 
virtual const char *  get_string_property (Sint32 index, const char **value)
  Used to return arbitrary key / value pairs. More...
 

Detailed Description

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 Plugin, which provide different interfaces in addition to the interface defined by Plugin.

Member Function Documentation

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

Get the name of the plugin.

Returns
A string containing the name of the plugin.

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

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

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

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

Used to return arbitrary 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. The string returned should be static. This allows a plugin to return arbitrary data.

Parameters
index The index to query.
value A static string containing the return value.
virtual const char* mi::base::Plugin::get_type ( ) const
pure virtual

Get a type string for the plugin.

For example, "image" for image plugins.

Returns
A string containing the plugin type.
virtual void mi::base::Plugin::release ( )
pure virtual

Release the plugin giving back all allocated resources.