7#ifndef MI_BASE_INTERFACE_IMPLEMENT_H
8#define MI_BASE_INTERFACE_IMPLEMENT_H
76 : m_refcnt{other.m_refcnt.swap(0)}
83 other.m_refcnt = m_refcnt.
swap(other.m_refcnt);
121 return I::get_interface_static(
this, interface_id);
136 return I::get_interface_static(
this, interface_id);
139 using I::get_interface;
144 return typename I::IID();
176template <
class I1,
class I2>
243 const IInterface* iptr = I1::get_interface_static(
244 static_cast<const I1*
>(
this), interface_id);
248 return I2::get_interface_static(
static_cast<const I2*
>(
this), interface_id);
263 IInterface* iptr = I1::get_interface_static(
static_cast<I1*
>(
this), interface_id);
267 return I2::get_interface_static(
static_cast<I2*
>(
this), interface_id);
270 using I1::get_interface;
275 return typename I1::IID();
336 return I::get_interface_static(
this, interface_id);
351 return I::get_interface_static(
this, interface_id);
354 using I::get_interface;
359 return typename I::IID();
32-bit unsigned counter with atomic arithmetic, increments, and decrements.
A 32-bit unsigned counter with atomic arithmetic, increments, and decrements.
Definition: atom.h:32
The basic extensible interface.
Definition: iinterface.h:103
Mixin class template for deriving interface implementations from two interfaces.
Definition: interface_implement.h:178
Mixin class template for deriving singleton interface implementations, where the reference count is f...
Definition: interface_implement.h:304
Mixin class template for deriving interface implementations.
Definition: interface_implement.h:41
Interface_implement(const Interface_implement<I> &other)
Copy constructor.
Definition: interface_implement.h:56
Uint32 release() const override
Returns the fixed reference count of one.
Definition: interface_implement.h:319
Uint32 retain() const override
Returns the fixed reference count of one.
Definition: interface_implement.h:310
Uint32 release() const override
Decrements the reference count.
Definition: interface_implement.h:101
Atom32 & refcount() const
Get the current refcount.
Definition: interface_implement.h:149
virtual Uint32 release() const
Decrements the reference count.
Definition: interface_implement.h:223
Uuid get_iid() const override
Returns the interface ID of the most derived interface.
Definition: interface_implement.h:142
Interface_implement_2(Uint32 initial=1)
Constructor.
Definition: interface_implement.h:183
const IInterface * get_interface(const Uuid &interface_id) const override
Acquires a const interface.
Definition: interface_implement.h:119
Interface_implement(Interface_implement &&other)
Move constructor.
Definition: interface_implement.h:75
virtual Uint32 retain() const
Increments the reference count.
Definition: interface_implement.h:213
Interface_implement_2(const Interface_implement_2<I1, I2> &other)
Copy constructor.
Definition: interface_implement.h:191
const IInterface * get_interface(const Uuid &interface_id) const override
Acquires a const interface.
Definition: interface_implement.h:334
IInterface * get_interface(const Uuid &interface_id) override
Acquires a mutable interface.
Definition: interface_implement.h:349
Interface_implement<I> & operator=(const Interface_implement<I> &other)
Assignment operator.
Definition: interface_implement.h:66
Uuid get_iid() const override
Returns the interface ID of the most derived interface.
Definition: interface_implement.h:357
Interface_implement(Uint32 initial=1)
Constructor.
Definition: interface_implement.h:48
virtual const IInterface * get_interface(const Uuid &interface_id) const
Acquires a const interface.
Definition: interface_implement.h:241
IInterface * get_interface(const Uuid &interface_id) override
Acquires a mutable interface.
Definition: interface_implement.h:134
virtual IInterface * get_interface(const Uuid &interface_id)
Acquires a mutable interface.
Definition: interface_implement.h:261
Uuid get_iid() const
Returns the interface ID of the most derived interface.
Definition: interface_implement.h:273
Interface_implement_2<I1, I2> & operator=(const Interface_implement_2<I1, I2> &other)
Assignment operator.
Definition: interface_implement.h:201
Uint32 retain() const override
Increments the reference count.
Definition: interface_implement.h:91
Interface_implement & operator=(Interface_implement &&other)
Move assignment.
Definition: interface_implement.h:81
Uint32 swap(const Uint32 rhs)
Assigns rhs to the counter and returns the old value of counter.
unsigned int Uint32
32-bit unsigned integer.
Definition: types.h:49
Common namespace for APIs of NVIDIA Advanced Rendering Center GmbH.
Definition: example_derivatives.dox:5
A 128 bit representation of a universally unique identifier (UUID or GUID).
Definition: uuid.h:26
A 128 bit representation of a universally unique identifier (UUID or GUID).