Iray SDK API nvidia_logo_transpbg.gif Up
iextension_api.h
Go to the documentation of this file.
1/***************************************************************************************************
2 * Copyright 2024 NVIDIA Corporation. All rights reserved.
3 **************************************************************************************************/
6
7#ifndef MI_NEURAYLIB_IEXTENSION_API_H
8#define MI_NEURAYLIB_IEXTENSION_API_H
9
10#include <mi/base/handle.h>
13
14namespace mi {
15
16class IEnum_decl;
17class IStructure_decl;
18
19namespace neuraylib {
20
25class IExporter;
26class IImporter;
27
30class IExtension_api : public
31 mi::base::Interface_declare<0xdf2dd31e,0xeeaf,0x40b2,0x8c,0x5f,0x0a,0xb2,0xad,0x44,0x61,0x91>
32{
33public:
35
36
58 const char* class_name, base::Uuid uuid, IUser_class_factory* factory) = 0;
59
81 template <class T>
82 Sint32 register_class( const char* class_name)
83 {
85 return register_class( class_name, typename T::IID(), factory.get());
86 }
87
103 virtual Sint32 unregister_class( const char* class_name, base::Uuid uuid) = 0;
104
122 template <class T>
123 Sint32 unregister_class( const char* class_name)
124 {
125 return unregister_class( class_name, typename T::IID());
126 }
127
129
131
142 virtual Sint32 register_importer( IImporter* importer) = 0;
143
154 virtual Sint32 register_exporter( IExporter* exporter) = 0;
155
167 virtual Sint32 unregister_importer( IImporter* importer) = 0;
168
180 virtual Sint32 unregister_exporter( IExporter* exporter) = 0;
181
183
185
208 const char* structure_name, const IStructure_decl* decl) = 0;
209
221 virtual Sint32 unregister_structure_decl( const char* structure_name) = 0;
222
224
226
244 const char* enum_name, const IEnum_decl* decl) = 0;
245
255 virtual Sint32 unregister_enum_decl( const char* enum_name) = 0;
256
258
259};
260 // end group mi_neuray_configuration
262
263} // namespace neuraylib
264
265} // namespace mi
266
267#endif // MI_NEURAYLIB_IEXTENSION_API_H
An enum declaration is used to describe enum types.
Definition: ienum_decl.h:36
A structure declaration is used to describe structure types.
Definition: istructure_decl.h:34
Handle class template for interfaces, automatizing the lifetime control via reference counting.
Definition: handle.h:113
Mixin class template for deriving new interface declarations.
Definition: interface_declare.h:43
Abstract interface for exporters.
Definition: iexporter.h:33
This interface is used to extent the Iray SDK API.
Definition: iextension_api.h:32
virtual Sint32 register_exporter(IExporter *exporter)=0
Registers a new exporter with the Iray SDK API.
virtual Sint32 register_enum_decl(const char *enum_name, const IEnum_decl *decl)=0
Registers an enum declaration with the Iray SDK API.
virtual Sint32 unregister_enum_decl(const char *enum_name)=0
Unregisters an enum declaration with the Iray SDK API.
virtual Sint32 register_structure_decl(const char *structure_name, const IStructure_decl *decl)=0
Registers a structure declaration with the Iray SDK API.
virtual Sint32 unregister_structure_decl(const char *structure_name)=0
Unregisters a structure declaration with the Iray SDK API.
virtual Sint32 unregister_exporter(IExporter *exporter)=0
Unregisters an exporter registered with the Iray SDK API.
virtual Sint32 unregister_class(const char *class_name, base::Uuid uuid)=0
Unregisters a class with the Iray SDK API.
Sint32 register_class(const char *class_name)
Registers a class with the Iray SDK API.
Definition: iextension_api.h:82
Sint32 unregister_class(const char *class_name)
Unregisters a class with the Iray SDK API.
Definition: iextension_api.h:123
virtual Sint32 register_importer(IImporter *importer)=0
Registers a new importer with the Iray SDK API.
virtual Sint32 unregister_importer(IImporter *importer)=0
Unregisters an importer registered with the Iray SDK API.
virtual Sint32 register_class(const char *class_name, base::Uuid uuid, IUser_class_factory *factory)=0
Registers a class with the Iray SDK API.
Abstract interface for importers.
Definition: iimporter.h:32
Abstract interface for user class factories.
Definition: iuser_class_factory.h:31
This mixin class provides a default implementation of the IUser_class_factory interface.
Definition: iuser_class_factory.h:66
Interface * get() const
Access to the interface. Returns 0 for an invalid interface.
Definition: handle.h:294
signed int Sint32
32-bit signed integer.
Definition: types.h:46
Smart-pointer handle class for interfaces, const and non-const version.
Mixin class template for deriving new interface declarations.
Abstract interface for factories for user-defined class.
Common namespace for APIs of NVIDIA Advanced Rendering Center GmbH.
Definition: neuraylib.h:179
A 128 bit representation of a universally unique identifier (UUID or GUID).
Definition: uuid.h:26