DiCE API nvidia_logo_transpbg.gif Up
icluster.h
Go to the documentation of this file.
1/***************************************************************************************************
2 * Copyright 2023 NVIDIA Corporation. All rights reserved.
3 **************************************************************************************************/
6
7#ifndef MI_NEURAYLIB_ICLUSTER_H
8#define MI_NEURAYLIB_ICLUSTER_H
9
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
22class IHost_properties;
23
47class ICluster : public
48 mi::base::Interface_declare<0x4511782c,0x83cb,0x4d92,0xbd,0xb8,0x4d,0x41,0xad,0x4f,0xd2,0xeb>
49{
50public:
65 virtual base::IInterface* get_api_component( const base::Uuid& uuid) const = 0;
66
81 template<class T>
83 {
84 base::IInterface* ptr_iinterface = get_api_component( typename T::IID());
85 if ( !ptr_iinterface)
86 return 0;
87 T* ptr_T = static_cast<T*>( ptr_iinterface->get_interface( typename T::IID()));
88 ptr_iinterface->release();
89 return ptr_T;
90 }
91
105 virtual Sint32 join( bool blocking = true) = 0;
106
108 virtual Sint32 leave( bool blocking = true) = 0;
109
114
123 virtual const IHost_properties* get_host_properties() const = 0;
124
136 virtual Sint32 set_host_property( const char* key, const char* value) = 0;
137};
138 // end group mi_neuray_cluster
140
141} // namespace neuraylib
142
143} // namespace mi
144
145// X11/Xlib.h defines Status to int
146#if defined(_XLIB_H_) || defined(_X11_XLIB_H_)
147#define Status int
148#endif // _XLIB_H_ || _X11_XLIB_H_
149
150#endif // MI_NEURAYLIB_ICLUSTER_H
The basic extensible interface.
Definition: iinterface.h:103
Mixin class template for deriving new interface declarations.
Definition: interface_declare.h:43
This class represents an additional cluster to be used for storing data, communicating,...
Definition: icluster.h:49
T * get_api_component() const
Returns an API component belonging to this cluster.
Definition: icluster.h:82
virtual base::IInterface * get_api_component(const base::Uuid &uuid) const =0
Returns an API component belonging to this cluster.
virtual Sint32 set_host_property(const char *key, const char *value)=0
Sets a host property for this host.
virtual Sint32 join(bool blocking=true)=0
Joins the cluster.
virtual neuraylib::INeuray::Status get_status() const =0
Returns the status of this cluster.
virtual Sint32 leave(bool blocking=true)=0
Leaves the cluster.
virtual const IHost_properties * get_host_properties() const =0
Returns the host properties for this host.
This interface contains information about a local or remote host.
Definition: ihost_properties.h:27
Status
The operational status of the library or additional clusters .
Definition: ineuray.h:92
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.
signed int Sint32
32-bit signed integer.
Definition: types.h:46
Main DiCE API interface.
Mixin class template for deriving new interface declarations.
Common namespace for APIs of NVIDIA Advanced Rendering Center GmbH.
Definition: dice.h:89
A 128 bit representation of a universally unique identifier (UUID or GUID).
Definition: uuid.h:26