7#ifndef MI_BASE_INTERFACE_IMPLEMENT_H
8#define MI_BASE_INTERFACE_IMPLEMENT_H
75 : m_refcnt{other.m_refcnt.swap(0)}
82 other.m_refcnt = m_refcnt.
swap(other.m_refcnt);
120 return I::get_interface_static(
this, interface_id);
135 return I::get_interface_static(
this, interface_id);
138 using I::get_interface;
143 return typename I::IID();
175template <
class I1,
class I2>
242 const IInterface* iptr = I1::get_interface_static(
243 static_cast<const I1*
>(
this), interface_id);
247 return I2::get_interface_static(
static_cast<const I2*
>(
this), interface_id);
262 IInterface* iptr = I1::get_interface_static(
static_cast<I1*
>(
this), interface_id);
266 return I2::get_interface_static(
static_cast<I2*
>(
this), interface_id);
269 using I1::get_interface;
274 return typename I1::IID();
335 return I::get_interface_static(
this, interface_id);
350 return I::get_interface_static(
this, interface_id);
353 using I::get_interface;
358 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:43
The basic extensible interface.
Definition: iinterface.h:104
Mixin class template for deriving interface implementations from two interfaces.
Definition: interface_implement.h:177
Mixin class template for deriving singleton interface implementations, where the reference count is f...
Definition: interface_implement.h:303
Mixin class template for deriving interface implementations.
Definition: interface_implement.h:40
Interface_implement(const Interface_implement<I> &other)
Copy constructor.
Definition: interface_implement.h:55
Uint32 release() const override
Returns the fixed reference count of one.
Definition: interface_implement.h:318
Uint32 retain() const override
Returns the fixed reference count of one.
Definition: interface_implement.h:309
virtual IInterface * get_interface(const Uuid &interface_id) override
Acquires a mutable interface.
Definition: interface_implement.h:260
Uint32 release() const override
Decrements the reference count.
Definition: interface_implement.h:100
Atom32 & refcount() const
Get the current refcount.
Definition: interface_implement.h:148
Uuid get_iid() const override
Returns the interface ID of the most derived interface.
Definition: interface_implement.h:141
Interface_implement_2(Uint32 initial=1)
Constructor.
Definition: interface_implement.h:182
const IInterface * get_interface(const Uuid &interface_id) const override
Acquires a const interface.
Definition: interface_implement.h:118
Uuid get_iid() const override
Returns the interface ID of the most derived interface.
Definition: interface_implement.h:272
Interface_implement(Interface_implement &&other)
Move constructor.
Definition: interface_implement.h:74
Interface_implement_2(const Interface_implement_2<I1, I2> &other)
Copy constructor.
Definition: interface_implement.h:190
virtual const IInterface * get_interface(const Uuid &interface_id) const override
Acquires a const interface.
Definition: interface_implement.h:240
const IInterface * get_interface(const Uuid &interface_id) const override
Acquires a const interface.
Definition: interface_implement.h:333
IInterface * get_interface(const Uuid &interface_id) override
Acquires a mutable interface.
Definition: interface_implement.h:348
Interface_implement<I> & operator=(const Interface_implement<I> &other)
Assignment operator.
Definition: interface_implement.h:65
virtual Uint32 release() const override
Decrements the reference count.
Definition: interface_implement.h:222
virtual Uint32 retain() const override
Increments the reference count.
Definition: interface_implement.h:212
Uuid get_iid() const override
Returns the interface ID of the most derived interface.
Definition: interface_implement.h:356
Interface_implement(Uint32 initial=1)
Constructor.
Definition: interface_implement.h:47
IInterface * get_interface(const Uuid &interface_id) override
Acquires a mutable interface.
Definition: interface_implement.h:133
Interface_implement_2<I1, I2> & operator=(const Interface_implement_2<I1, I2> &other)
Assignment operator.
Definition: interface_implement.h:200
Uint32 retain() const override
Increments the reference count.
Definition: interface_implement.h:90
Interface_implement & operator=(Interface_implement &&other)
Move assignment.
Definition: interface_implement.h:80
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).