This is an object representing the Iray library. More...
#include <ineuray.h>
Public Types | |
enum | Status { PRE_STARTING = 0 , STARTING = 1 , STARTED = 2 , SHUTTINGDOWN = 3 , SHUTDOWN = 4 , FAILURE = 5 , FORCE_32_BIT = 0xffffffffU } |
The operational status of the library. More... | |
![]() | |
using | Self = Interface_declare< id1, ... > |
Own type. More... | |
using | IID = Uuid_t< id1, ... > |
Declares the interface ID (IID) of this interface. More... | |
![]() | |
using | IID = Uuid_t<0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0> |
Declares the interface ID (IID) of this interface. More... | |
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 version of the Iray library. More... | |
virtual Sint32 | start (bool blocking=true)=0 |
Starts the operation of the Iray library. More... | |
virtual Sint32 | shutdown (bool blocking=true)=0 |
Shuts down the library. More... | |
virtual Status | get_status () const =0 |
Returns the status of the library. More... | |
virtual base::IInterface * | get_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... | |
![]() | |
virtual Uint32 | retain () const =0 |
Increments the reference count. More... | |
virtual Uint32 | release () const =0 |
Decrements the reference count. More... | |
virtual const IInterface * | get_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 IInterface * | get_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 | |
![]() | |
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 bool | compare_iid (const Uuid &iid) |
Compares the interface ID iid against the interface ID of this interface. More... | |
This is an object representing the Iray library.
Only one object of this type will exist at a time. It is used for configuration, startup and shutdown of the Iray library.
The operational status of the library.
|
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).
T | The type of the API components to be queried. |
nullptr
if the API component is not supported or currently not available.
|
pure virtual |
Returns an API component from the Iray SDK API.
uuid | The UUID under which the API components was registered. For built-in API components this is the interface ID of the corresponding interface. |
nullptr
if the API component is not supported or currently not available.
|
pure virtual |
Returns the interface version of the Iray library.
This number changes whenever the abstract interfaces of the Iray SDK API changes.
|
pure virtual |
Returns the status of the library.
|
pure virtual |
Returns the version of the Iray library.
This string contains the product version, build number, build date, and platform of the current library.
|
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().
uuid | The ID of the API component to register, e.g., the interface ID of the corresponding interface. |
api_component | The API component to register. |
nullptr
).uuid
.
|
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.
api_component | The API component to register. |
nullptr
).ID
T::IID().
|
pure virtual |
Shuts down the library.
For proper shutdown this may only be called after all transactions have been committed and all rendering is finished.
You also need to release all interface pointers related to functionality obtained after startup before calling this method. In case you use the mi::base::Handle class (or another handle class), you need to make sure that all such handles have been reset or destroyed.
blocking | Indicates whether the shutdown should be done in blocking mode. If true the method will not return before shutdown has completed. If false the method will return immediately and the shutdown is done in a separate thread. The status of the shutdown sequence can be checked via get_status(). |
|
pure virtual |
Starts the operation of the Iray library.
All configuration which is marked to be done before the start of the library must be done before calling this function. When calling this function the Iray SDK will start threads and start network operations etc. The Iray library may not be ready for operation after the call returned if blocking mode is not used.
blocking | Indicates whether the startup should be done in blocking mode. If true the method will not return before all initialization was done. If false the method will return immediately and the startup is done in a separate thread. The status of the startup sequence can be checked via get_status(). |
|
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()).
T::IID()
.
|
pure virtual |
Unregisters an API component with the Iray SDK API.
The API component will no longer be accessible via get_api_component().
uuid | The ID of the API component to unregister. |
uuid
.