neuray API Programmer's Manual

mi::neuraylib::IPlugin_configuration Class Reference

[Configuration Interfaces]

Description

This interface is used to load plugins and to query information about loaded plugins.

Public Member Functions

virtual base::​IPlugin_descriptorget_plugin_descriptor( Size index) const =0
Returns a descriptor for the index -th loaded plugin. More...
virtual Size get_plugin_length() const =0
Returns the number of loaded plugins. More...
virtual Sint32 load_plugin_library( const char* path) =0
Loads a plugin library. More...
virtual Sint32 load_plugins_from_directory( const char* path) =0
Loads all plugins from a given directory. More...

Member Functions

virtual base::​IPlugin_descriptor* mi::​neuraylib::​IPlugin_configuration::get_plugin_descriptor( Size index) const [pure virtual]

Returns a descriptor for the index -th loaded plugin.

Returns

A descriptor for the index -th loaded plugin, or NULL in case of failure.

virtual Size mi::​neuraylib::​IPlugin_configuration::get_plugin_length() const [pure virtual]

Returns the number of loaded plugins.

Returns

The number of loaded plugins.

virtual Sint32 mi::​neuraylib::​IPlugin_configuration::load_plugin_library( const char* path) [pure virtual]

Loads a plugin library. This function loads the specified shared library, enumerates all plugin classes in the specified shared library, and adds them to the system.

This function can only be called before has been started.

Parameters

path
The path of the shared library to be loaded. This shared library needs to be a valid plugin for .

Returns

0, in case of success, -1 in case of failure.

virtual Sint32 mi::​neuraylib::​IPlugin_configuration::load_plugins_from_directory( const char* path) [pure virtual]

Loads all plugins from a given directory. Enumerates all plugins in the given directory in alphabetic order and calls load_plugin_library() for each of them in turn. On Windows, all files with the extension .dll are considered, while on Linux and MacOS X all files with the extension .so are considered. Additionally, on MacOS X all files with extension .dylib are considered.

Parameters

path
The path of the directory.

Returns

0, in case of success, -1 in case of failure.