NVIDIA Iray API Home  Up
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
mi::neuraylib::IExtension_api Class Referenceabstract

This interface is used to extent the Iray API. More...

Inheritance diagram for mi::neuraylib::IExtension_api:
Inheritance graph
[legend]

Public Member Functions

User classes
virtual Sint32  register_class (const char *class_name, base::Uuid uuid, IUser_class_factory *factory)=0
  Registers a class with the Iray API. More...
 
template<class T >
Sint32  register_class (const char *class_name)
  Registers a class with the Iray API. More...
 
Importers and exporters
virtual Sint32  register_importer (IImporter *importer)=0
  Registers a new importer with the Iray API. More...
 
virtual Sint32  register_exporter (IExporter *exporter)=0
  Registers a new exporter with the Iray API. More...
 
virtual Sint32  unregister_importer (IImporter *importer)=0
  Unregisters an importer registered with the Iray API. More...
 
virtual Sint32  unregister_exporter (IExporter *exporter)=0
  Unregisters an exporter registered with the Iray API. More...
 
Structure declarations
virtual Sint32  register_structure_decl (const char *structure_name, const IStructure_decl *decl)=0
  Registers a structure declaration with the Iray API. More...
 
virtual Sint32  unregister_structure_decl (const char *structure_name)=0
  Unregisters a structure declaration with the Iray API. More...
 
Call declarations
virtual Sint32  register_call_decl (const char *call_name, const ICall_decl *decl)=0
  Registers a call declaration with the Iray API. More...
 
virtual Sint32  unregister_call_decl (const char *call_name)=0
  Unregisters a call declaration with the Iray API. More...
 
Enum declarations
virtual Sint32  register_enum_decl (const char *enum_name, const IEnum_decl *decl)=0
  Registers an enum declaration with the Iray API. More...
 
virtual Sint32  unregister_enum_decl (const char *enum_name)=0
  Unregisters an enum declaration with the Iray API. More...
 

Additional Inherited Members

- Public Types inherited from mi::base::Interface_declare< 0xdf2dd31e, 0xeeaf, 0x40b2, 0x8c, 0x5f, 0x0a, 0xb2, 0xad, 0x44, 0x61, 0x91 >
typedef Interface_declare< id1,
id2, id3, id4, id5, id6, id7,
id8, id9, id10, id11,
IInterface
Self
  Own type. More...
 
typedef Uuid_t< id1, id2, id3,
id4, id5, id6, id7, id8, id9,
id10, id11 > 
IID
  Declares the interface ID (IID) of this interface. More...
 
- Static Public Member Functions inherited from mi::base::Interface_declare< 0xdf2dd31e, 0xeeaf, 0x40b2, 0x8c, 0x5f, 0x0a, 0xb2, 0xad, 0x44, 0x61, 0x91 >
static bool  compare_iid (const Uuid &iid)
  Compares the interface ID iid against the interface ID of this interface and of its ancestors. More...
 

Detailed Description

This interface is used to extent the Iray API.

For example it offers methods to load and to set up plugins.

Member Function Documentation

virtual Sint32 mi::neuraylib::IExtension_api::register_call_decl ( const char *  call_name,
const ICall_decl decl 
)
pure virtual

Registers a call declaration with the Iray API.

Note that the type names of the call members are not checked for validity here (except for cycles). Thus, it is possible that this methods succeeds, but creating an instance of the type call_name will fail.

Parameters
call_name The name to be used to refer to this call declaration. The name must consist only of alphanumeric characters or underscores, must not start with an underscore, and must not be the empty string.
decl The call declaration. The declaration is internally cloned such that subsequent changes have no effect on the registered declaration.
Returns
  • 0: Success.
  • -1: There is already a class, structure, enum, or call declaration registered under the name call_name.
  • -2: Invalid parameters (NULL pointer).
  • -4: Invalid name for a call declaration.
  • -5: A registration under the name call_name would cause an infinite cycle of nested call types.
virtual Sint32 mi::neuraylib::IExtension_api::register_class ( const char *  class_name,
base::Uuid  uuid,
IUser_class_factory factory 
)
pure virtual

Registers a class with the Iray API.

All user-defined classes to be used with the Iray API must be registered. The only exception are classes that never cross the API boundary, for example, classes only used locally within a plugin. Class registration must be done before Iray has been started or in mi::neuraylib::IPlugin::init().

Parameters
class_name The class name under which the class is to be registered. The class name must consist only of alphanumeric characters or underscores, must not start with an underscore, and must not be the empty string.
uuid The class ID of the class. You can simply pass IID() of your class derived from mi::neuraylib::User_class.
factory The factory method of the class.
Returns
  • 0: Success.
  • -1: There is already a class or structure declaration registered under the name class_name or UUID uuid.
  • -2: Invalid parameters (NULL pointer).
  • -3: The method may not be called at that point of time.
  • -4: Invalid class name.
template<class T >
Sint32 mi::neuraylib::IExtension_api::register_class ( const char *  class_name)
inline

Registers a class with the Iray API.

All user-defined classes to be used with the Iray API must be registered. The only exception are classes that never cross the API boundary, for example, classes only used locally within a plugin. Class registration must be done before Iray has been started or in mi::neuraylib::IPlugin::init().

This templated member function is a wrapper of the non-template variant for the user's convenience. It uses the default class factory mi::neuraylib::User_class_factory specialized for T.

Parameters
class_name The class name under which the class is to be registered. The class name must consist only of alphanumeric characters or underscores, must not start with an underscore, and must not be the empty string.
Returns
  • 0: Success.
  • -1: There is already a class or structure declaration registered under the name class_name or UUID T::IID().
  • -2: Invalid parameters (NULL pointer).
  • -3: The method may not be called at that point of time.
  • -4: Invalid class name.
virtual Sint32 mi::neuraylib::IExtension_api::register_enum_decl ( const char *  enum_name,
const IEnum_decl decl 
)
pure virtual

Registers an enum declaration with the Iray API.

Parameters
enum_name The name to be used to refer to this enum declaration. The name must consist only of alphanumeric characters or underscores, must not start with an underscore, and must not be the empty string.
decl The enum declaration. The declaration is internally cloned such that subsequent changes have no effect on the registered declaration.
Returns
  • 0: Success.
  • -1: There is already a class, structure, enum, or call declaration registered under the name enum_name.
  • -2: Invalid parameters (NULL pointer).
  • -4: Invalid name for an enum declaration.
  • -6: The enum declaration is empty and therefore invalid.
virtual Sint32 mi::neuraylib::IExtension_api::register_exporter ( IExporter exporter)
pure virtual

Registers a new exporter with the Iray API.

Exporter registration must be done before Iray has been started or in mi::neuraylib::IPlugin::init().

Parameters
exporter The new exporter to register.
Returns
  • 0: Success.
  • -1: Invalid parameters (NULL pointer).
  • -2: The method may not be called at that point of time.
virtual Sint32 mi::neuraylib::IExtension_api::register_importer ( IImporter importer)
pure virtual

Registers a new importer with the Iray API.

Importer registration must be done before Iray has been started or in mi::neuraylib::IPlugin::init().

Parameters
importer The new importer to register.
Returns
  • 0: Success.
  • -1: Invalid parameters (NULL pointer).
  • -2: The method may not be called at that point of time.
virtual Sint32 mi::neuraylib::IExtension_api::register_structure_decl ( const char *  structure_name,
const IStructure_decl decl 
)
pure virtual

Registers a structure declaration with the Iray API.

Note that the type names of the structure members are not checked for validity here (except for cycles). Thus, it is possible that this methods succeeds, but creating an instance of the type structure_name will fail.

Parameters
structure_name The name to be used to refer to this structure declaration. The name must consist only of alphanumeric characters or underscores, must not start with an underscore, and must not be the empty string.
decl The structure declaration. The declaration is internally cloned such that subsequent changes have no effect on the registered declaration.
Returns
  • 0: Success.
  • -1: There is already a class, structure, enum, or call declaration registered under the name structure_name.
  • -2: Invalid parameters (NULL pointer).
  • -4: Invalid name for a structure declaration.
  • -5: A registration under the name structure_name would cause an infinite cycle of nested structure types.
virtual Sint32 mi::neuraylib::IExtension_api::unregister_call_decl ( const char *  call_name)
pure virtual

Unregisters a call declaration with the Iray API.

Parameters
call_name The name of the call declaration to be unregistered.
Returns
  • 0: Success.
  • -1: There is no call declaration registered under the name call_name.
  • -2: Invalid parameters (NULL pointer).
  • -4: Invalid name for a call declaration.
virtual Sint32 mi::neuraylib::IExtension_api::unregister_enum_decl ( const char *  enum_name)
pure virtual

Unregisters an enum declaration with the Iray API.

Parameters
enum_name The name of the enum declaration to be unregistered.
Returns
  • 0: Success.
  • -1: There is no enum declaration registered under the name enum_name.
  • -2: Invalid parameters (NULL pointer).
  • -4: Invalid name for an enum declaration.
virtual Sint32 mi::neuraylib::IExtension_api::unregister_exporter ( IExporter exporter)
pure virtual

Unregisters an exporter registered with the Iray API.

Unregistration must be done after Iray has been shut down or in mi::neuraylib::IPlugin::exit().

Parameters
exporter The exporter to unregister.
Returns
  • 0: Success.
  • -1: Invalid parameters (NULL pointer).
  • -2: The method may not be called at that point of time.
  • -3: This exporter is not registered.
virtual Sint32 mi::neuraylib::IExtension_api::unregister_importer ( IImporter importer)
pure virtual

Unregisters an importer registered with the Iray API.

Unregistration must be done after Iray has been shut down or in mi::neuraylib::IPlugin::exit().

Parameters
importer The importer to unregister.
Returns
  • 0: Success.
  • -1: Invalid parameters (NULL pointer).
  • -2: The method may not be called at that point of time.
  • -3: This importer is not registered.
virtual Sint32 mi::neuraylib::IExtension_api::unregister_structure_decl ( const char *  structure_name)
pure virtual

Unregisters a structure declaration with the Iray API.

Parameters
structure_name The name of the structure declaration to be unregistered.
Returns
  • 0: Success.
  • -1: There is no structure declaration registered under the name structure_name.
  • -2: Invalid parameters (NULL pointer).
  • -4: Invalid name for a structure declaration.
  • -6: The structure declaration is predefined and cannot be unregistered.