DiCE API nvidia_logo_transpbg.gif Up
mi::neuraylib::IPlugin_configuration Class Referenceabstract

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

#include <iplugin_configuration.h>

Inheritance diagram for mi::neuraylib::IPlugin_configuration:

Public Member Functions

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...
 
virtual Size get_plugin_length () const =0
 Returns the number of loaded plugins. More...
 
virtual base::IPlugin_descriptorget_plugin_descriptor (Size index) const =0
 Returns a descriptor for the index -th loaded plugin. More...
 
- Public Member Functions inherited from mi::base::IInterface
virtual Uint32 retain () const =0
 Increments the reference count. More...
 
virtual Uint32 release () const =0
 Decrements the reference count. More...
 
virtual const IInterfaceget_interface (const Uuid &interface_id) const =0
 Acquires a const interface from another. More...
 
template<class T>
const T * get_interface () const
 Acquires a const interface from another. More...
 
virtual IInterfaceget_interface (const Uuid &interface_id)=0
 Acquires a mutable interface from another. More...
 
template<class T>
T * get_interface ()
 Acquires a mutable interface from another. More...
 
virtual Uuid get_iid () const =0
 Returns the interface ID of the most derived interface. More...
 

Additional Inherited Members

- Public Types inherited from mi::base::Interface_declare< 0x11285c46, ... >
typedef Interface_declare< id1, ... > Self
 Own type. More...
 
typedef Uuid_t< id1, ... > IID
 Declares the interface ID (IID) of this interface. More...
 
- Public Types inherited from mi::base::IInterface
typedef Uuid_t<0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0> IID
 Declares the interface ID (IID) of this interface. More...
 
- Static Public Member Functions inherited from mi::base::Interface_declare< 0x11285c46, ... >
static bool compare_iid (const Uuid &iid)
 Compares the interface ID iid against the interface ID of this interface and of its ancestors. More...
 
- Static Public Member Functions inherited from mi::base::IInterface
static bool compare_iid (const Uuid &iid)
 Compares the interface ID iid against the interface ID of this interface. More...
 

Detailed Description

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

Member Function Documentation

 get_plugin_descriptor()

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.

 get_plugin_length()

virtual Size mi::neuraylib::IPlugin_configuration::get_plugin_length ( ) const
pure virtual

Returns the number of loaded plugins.

Returns
The number of loaded plugins.

 load_plugin_library()

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 DiCE has been started.

Parameters
pathThe path of the shared library to be loaded. This shared library needs to be a valid plugin for DiCE.
Returns
0, in case of success, -1 in case of failure.

 load_plugins_from_directory()

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
pathThe path of the directory.
Returns
0, in case of success, -1 in case of failure.