NVIDIA Iray: Base API nvidia_logo_transpbg.gif 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...

#include <plugin.h>

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.
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.
virtual const char * get_compiler () const
 Returns the compiler used to compile the plugin.
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...

Static Public Attributes

static const Sint32 s_version = 3

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 Sint32 mi::base::Plugin::get_plugin_system_version ( ) const

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.

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

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.

indexThe index to query.
valueThe property value for index.
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 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.

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