neuray API Programmer's Manual

mi::base::Plugin Class Reference

[Plugin Support]

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.

Public Member Functions

virtual const char* get_compiler() const
Returns the compiler used to compile the plugin.
virtual const char* get_name() const =0
Returns the name of the plugin.
virtual Sint32 get_plugin_system_version() const
Returns the version of the plugin system used to compile this. More...
virtual const char* get_string_property( Sint32 index, const char** value)
Returns a plugin property. 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.
virtual void release() =0
Destroys the plugin instance. More...

Member Functions

virtual const char* mi::​base::​Plugin::get_compiler() const [inline, virtual]

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.

virtual Sint32 mi::​base::​Plugin::get_plugin_system_version() const [inline, virtual]

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) [inline, virtual]

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 [inline, virtual]

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.