Iray SDK API nvidia_logo_transpbg.gif Up
ineuray.h
Go to the documentation of this file.
1/**************************************************************************************************
2 * Copyright 2026 NVIDIA Corporation. All rights reserved.
3 **************************************************************************************************/
6
7#ifndef MI_NEURAYLIB_INEURAY_H
8#define MI_NEURAYLIB_INEURAY_H
9
11#include <mi/neuraylib/version.h> // for MI_NEURAYLIB_DEPRECATED_ENUM_VALUE
12
13// X11/Xlib.h defines Status to int
14#if defined(_XLIB_H_) || defined(_X11_XLIB_H_)
15#undef Status
16#endif // _XLIB_H_ || _X11_XLIB_H_
17
18namespace mi {
19
20namespace neuraylib {
21
43class INeuray : public
44 mi::base::Interface_declare<0xc31b49fc,0xc499,0x4d70,0x93,0x01,0x67,0xbb,0x72,0x62,0xe7,0xef>
45{
46public:
50 virtual Uint32 get_interface_version() const = 0;
51
56 virtual const char* get_version() const = 0;
57
58 // Startup and shutdown
59
88 virtual Sint32 start( bool blocking = true) = 0;
89
94 {
106 FAILURE = 5
107 MI_NEURAYLIB_DEPRECATED_ENUM_VALUE(FORCE_32_BIT, 0xffffffffU)
108 };
109
132 virtual Sint32 shutdown( bool blocking = true) = 0;
133
137 virtual Status get_status() const = 0;
138
149 virtual base::IInterface* get_api_component( const base::Uuid& uuid) const = 0;
150
163 template<class T>
165 {
166 base::IInterface* ptr_iinterface = get_api_component( typename T::IID());
167 if ( !ptr_iinterface)
168 return nullptr;
169 T* ptr_T = static_cast<T*>( ptr_iinterface->get_interface( typename T::IID()));
170 ptr_iinterface->release();
171 return ptr_T;
172 }
173
188 const base::Uuid& uuid, base::IInterface* api_component) = 0;
189
204 template<class T>
206 {
207 return register_api_component( typename T::IID(), api_component);
208 }
209
218 virtual Sint32 unregister_api_component( const base::Uuid& uuid) = 0;
219
231 template<class T>
233 {
234 return unregister_api_component( typename T::IID());
235 }
236};
237 // end group mi_neuray_ineuray
239
240} // namespace neuraylib
241
242} // namespace mi
243
244// X11/Xlib.h defines Status to int
245#if defined(_XLIB_H_) || defined(_X11_XLIB_H_)
246#define Status int
247#endif // _XLIB_H_ || _X11_XLIB_H_
248
249#endif // MI_NEURAYLIB_INEURAY_H
The basic extensible interface.
Definition: iinterface.h:103
Mixin class template for deriving new interface declarations.
Definition: interface_declare.h:43
This is an object representing the Iray library.
Definition: ineuray.h:45
virtual Sint32 shutdown(bool blocking=true)=0
Shuts down the library.
Sint32 unregister_api_component()
Unregisters an API component with the Iray SDK API.
Definition: ineuray.h:232
T * get_api_component() const
Returns an API component from the Iray SDK API.
Definition: ineuray.h:164
virtual Uint32 get_interface_version() const =0
Returns the interface version of the Iray library.
virtual base::IInterface * get_api_component(const base::Uuid &uuid) const =0
Returns an API component from the Iray SDK API.
virtual Sint32 unregister_api_component(const base::Uuid &uuid)=0
Unregisters an API component with the Iray SDK API.
Sint32 register_api_component(T *api_component)
Registers an API component with the Iray SDK API.
Definition: ineuray.h:205
virtual Sint32 register_api_component(const base::Uuid &uuid, base::IInterface *api_component)=0
Registers an API component with the Iray SDK API.
Status
The operational status of the library.
Definition: ineuray.h:94
@ SHUTTINGDOWN
The library or the cluster is shutting down.
Definition: ineuray.h:102
@ STARTING
The library or the cluster is starting.
Definition: ineuray.h:98
@ STARTED
The library or the cluster is ready for operation.
Definition: ineuray.h:100
@ SHUTDOWN
The library or the cluster has been shut down.
Definition: ineuray.h:104
@ PRE_STARTING
The library or the cluster has not yet been started.
Definition: ineuray.h:96
@ FAILURE
There was a failure during operation.
Definition: ineuray.h:106
virtual Status get_status() const =0
Returns the status of the library.
virtual const char * get_version() const =0
Returns the version of the Iray library.
virtual Sint32 start(bool blocking=true)=0
Starts the operation of the Iray library.
virtual const IInterface * get_interface(const Uuid &interface_id) const =0
Acquires a const interface from another.
virtual Uint32 release() const =0
Decrements the reference count.
int Sint32
32-bit signed integer.
Definition: types.h:46
unsigned int Uint32
32-bit unsigned integer.
Definition: types.h:49
Mixin class template for deriving new interface declarations.
Common namespace for APIs of NVIDIA Advanced Rendering Center GmbH.
Definition: neuraylib.h:179
Major and minor version number and an optional qualifier.
A 128 bit representation of a universally unique identifier (UUID or GUID).
Definition: uuid.h:26