Iray SDK API nvidia_logo_transpbg.gif Up
mi::neuraylib::IPlugin_api Class Referenceabstract

This abstract interface gives access to the Iray SDK API to plugins. More...

#include <iplugin_api.h>

Inheritance diagram for mi::neuraylib::IPlugin_api:

Public Member Functions

virtual Uint32 get_interface_version () const =0
 Returns the interface version of the Iray library. More...
 
virtual const char * get_version () const =0
 Returns the product version of the Iray library. More...
 
virtual base::IInterfaceget_api_component (const base::Uuid &uuid) const =0
 Returns an API component from the Iray SDK API. More...
 
template<class T>
T * get_api_component () const
 Returns an API component from the Iray SDK API. More...
 
virtual Sint32 register_api_component (const base::Uuid &uuid, base::IInterface *api_component)=0
 Registers an API component with the Iray SDK API. More...
 
template<class T>
Sint32 register_api_component (T *api_component)
 Registers an API component with the Iray SDK API. More...
 
virtual Sint32 unregister_api_component (const base::Uuid &uuid)=0
 Unregisters an API component with the Iray SDK API. More...
 
template<class T>
Sint32 unregister_api_component ()
 Unregisters an API component with the Iray SDK API. 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< 0xf237d52c, ... >
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< 0xf237d52c, ... >
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 abstract interface gives access to the Iray SDK API to plugins.

It offers functionality similar to INeuray, but does not allow to start or shutdown the library. On the other hand it allows the registration of user-defined classes.

Member Function Documentation

 get_api_component() [1/2]

template<class T>
T * mi::neuraylib::IPlugin_api::get_api_component ( ) const
inline

Returns an API component from the Iray SDK API.

This template variant requires that the API component is registered under the interface ID of the corresponding interface (which is the case for built-in API components).

See also
API components for a list of built-in API components.
register_api_component(), unregister_api_component()
Template Parameters
TThe type of the API components to be queried.
Returns
A pointer to the API component or NULL if the API component is not supported or currently not available.

 get_api_component() [2/2]

virtual base::IInterface * mi::neuraylib::IPlugin_api::get_api_component ( const base::Uuid uuid) const
pure virtual

Returns an API component from the Iray SDK API.

See also
API components for a list of built-in API components.
register_api_component(), unregister_api_component()
Parameters
uuidThe UUID under which the API components was registered. For built-in API components this is the interface ID of the corresponding interface.
Returns
A pointer to the API component or NULL if the API component is not supported or currently not available.

 get_interface_version()

virtual Uint32 mi::neuraylib::IPlugin_api::get_interface_version ( ) const
pure virtual

Returns the interface version of the Iray library.

This number changes whenever the abstract interfaces of the Iray SDK API change.

 get_version()

virtual const char * mi::neuraylib::IPlugin_api::get_version ( ) const
pure virtual

Returns the product version of the Iray library.

This string contains the product version, build number, build date, etc. of the current library.

 register_api_component() [1/2]

virtual Sint32 mi::neuraylib::IPlugin_api::register_api_component ( const base::Uuid uuid,
base::IInterface api_component 
)
pure virtual

Registers an API component with the Iray SDK API.

API components are a way for plugins to provide access to their functionality. The registration makes the API component available for subsequent calls of get_api_component().

Parameters
uuidThe ID of the API component to register, e.g., the interface ID of the corresponding interface.
api_componentThe API component to register.
Returns
  • 0: Success.
  • -1: Invalid parameters (NULL pointer).
  • -2: There is already an API component registered under the ID uuid.

 register_api_component() [2/2]

template<class T>
Sint32 mi::neuraylib::IPlugin_api::register_api_component ( T *  api_component)
inline

Registers an API component with the Iray SDK API.

API components are a way for plugins to provide access to their functionality. The registration makes the API component available for subsequent calls of get_api_component().

This template variant registers the API component under the interface ID of the corresponding interface.

Parameters
api_componentThe API component to register.
Returns
  • 0: Success.
  • -1: Invalid parameters (NULL pointer).
  • -2: There is already an API component registered under the ID T::IID().

 unregister_api_component() [1/2]

template<class T>
Sint32 mi::neuraylib::IPlugin_api::unregister_api_component ( )
inline

Unregisters an API component with the Iray SDK API.

The API component will no longer be accessible via get_api_component().

This template variant requires that the API component was registered under the interface ID of the corresponding interface (which is the case for the template variant of register_api_component()).

Returns
  • 0: Success.
  • -1: There is no API component registered under the ID T::IID().

 unregister_api_component() [2/2]

virtual Sint32 mi::neuraylib::IPlugin_api::unregister_api_component ( const base::Uuid uuid)
pure virtual

Unregisters an API component with the Iray SDK API.

The API component will no longer be accessible via get_api_component().

Parameters
uuidThe ID of the API component to unregister.
Returns
  • 0: Success.
  • -1: There is no API component registered under the ID uuid.