7#ifndef MI_NEURAYLIB_IUSER_CLASS_H
8#define MI_NEURAYLIB_IUSER_CLASS_H
35 mi::base::Interface_declare<0xa8bbfac5,0xf1b0,0x4ab5,0x99,0x18,0x9a,0x46,0xf8,0xb8,0x32,0x2b,
36 neuraylib::ISerializable>
96 using IID =
base::Uuid_t<id1, id2, id3, id4, id5, id6, id7, id8, id9, id10, id11>;
132 virtual Uint32 release()
const
141 if(( count == 2) && m_pointer) {
151 virtual bool set_pointer(
const base::IInterface* pointer)
153 base::Lock::Block block( &m_pointer_lock);
165 virtual const base::IInterface* get_pointer()
const
167 base::Lock::Block block( &m_pointer_lock);
177 mutable const base::IInterface* m_pointer =
nullptr;
180 mutable base::Lock m_pointer_lock;
This interface represents static arrays, i.e., arrays with a fixed number of elements.
Definition: iarray.h:37
The basic extensible interface.
Definition: iinterface.h:103
Mixin class template for deriving new interface declarations.
Definition: interface_declare.h:43
Mixin class template for deriving interface implementations.
Definition: interface_implement.h:41
Utility class to acquire a lock that is released by the destructor.
Definition: lock.h:67
Class template for a compile-time representation of universally unique identifiers (UUIDs or GUIDs).
Definition: uuid.h:122
A transaction provides a consistent view on the database.
Definition: itransaction.h:82
Abstract interface for user-defined classes.
Definition: iuser_class.h:37
virtual IArray * get_references(ITransaction *transaction) const =0
Returns the list of elements referenced by this element.
virtual IUser_class * copy() const =0
Creates a copy of the database element.
virtual const char * get_class_name() const =0
Returns a human readable identifier for the class this database element belongs to.
This mixin class should be used to implement the IUser_class interface.
Definition: iuser_class.h:93
~User_class()
Destructor.
Definition: iuser_class.h:112
base::Uuid_t< id1, ... > IID
Declares the class ID.
Definition: iuser_class.h:96
User_class()=default
Default constructor.
virtual base::Uuid get_class_id() const
Returns the class ID corresponding to the template parameters of this mixin class.
Definition: iuser_class.h:124
User_class & operator=(const User_class &other)
Assignment operator.
Definition: iuser_class.h:105
virtual const char * get_class_name() const
Returns a human readable class name.
Definition: iuser_class.h:118
User_class(const User_class &other)
Copy constructor.
Definition: iuser_class.h:102
#define mi_base_assert(expr)
Base API assertion macro (without message).
Definition: assert.h:86
Uint32 release() const override
Decrements the reference count.
Definition: interface_implement.h:101
virtual Uint32 retain() const =0
Increments the reference count.
Interface_implement<I> & operator=(const Interface_implement<I> &other)
Assignment operator.
Definition: interface_implement.h:66
Interface_implement(Uint32 initial=1)
Constructor.
Definition: interface_implement.h:48
virtual Uint32 release() const =0
Decrements the reference count.
Uint32 retain() const override
Increments the reference count.
Definition: interface_implement.h:91
unsigned char Uint8
8-bit unsigned integer.
Definition: types.h:47
unsigned short Uint16
16-bit unsigned integer.
Definition: types.h:48
unsigned int Uint32
32-bit unsigned integer.
Definition: types.h:49
Mixin class template for deriving new interface declarations.
Mixin class template for deriving interface implementations.
Serialization of objects to a byte stream.
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