7#ifndef MI_BASE_INTERFACE_MERGER_H
8#define MI_BASE_INTERFACE_MERGER_H
53template <
typename MAJOR,
typename MINOR>
70 if( MAJOR::compare_iid( iid))
72 return MINOR::compare_iid( iid);
86 return static_cast<const T*
>(
get_interface(
typename T::IID()));
107 return MAJOR::get_iid();
114 return MAJOR::retain();
121 return MAJOR::release();
135 return static_cast<const MAJOR*
>(
this);
149 return static_cast<MAJOR*
>(
this);
153template <
typename MAJOR,
typename MINOR>
155 const Uuid& interface_id)
const
157 const IInterface* iinterface = MAJOR::get_interface( interface_id);
160 return MINOR::get_interface_static(
static_cast<const MINOR*
>(
this), interface_id);
163template <
typename MAJOR,
typename MINOR>
165 const Uuid& interface_id)
167 IInterface* iinterface = MAJOR::get_interface( interface_id);
170 return MINOR::get_interface_static(
static_cast<MINOR*
>(
this), interface_id);
The basic extensible interface.
Definition: iinterface.h:103
This mixin merges the implementation of one interface with a second interface.
Definition: interface_merger.h:57
mi::Uint32 retain() const
Reimplements mi::base::IInterface::retain().
Definition: interface_merger.h:113
const T * get_interface() const
Reimplements mi::base::IInterface::get_interface() const.
Definition: interface_merger.h:85
MINOR MINOR_BASE
Typedef for the MINOR base class.
Definition: interface_merger.h:63
MAJOR MAJOR_BASE
Typedef for the MAJOR base class.
Definition: interface_merger.h:60
static bool compare_iid(const Uuid &iid)
Reimplements mi::base::IInterface::compare_iid().
Definition: interface_merger.h:69
Uuid get_iid() const
Reimplements mi::base::IInterface::get_iid().
Definition: interface_merger.h:106
mi::Uint32 release() const
Reimplements mi::base::IInterface::release().
Definition: interface_merger.h:120
const MAJOR * cast_to_major() const
Returns a pointer to the MAJOR base class.
Definition: interface_merger.h:134
MAJOR * cast_to_major()
Returns a pointer to the MAJOR base class.
Definition: interface_merger.h:148
T * get_interface()
Reimplements mi::base::IInterface::get_interface().
Definition: interface_merger.h:99
unsigned int Uint32
32-bit unsigned integer.
Definition: types.h:49
The basic extensible interface.
Common namespace for APIs of NVIDIA Advanced Rendering Center GmbH.
Definition: math.h:22
A 128 bit representation of a universally unique identifier (UUID or GUID).
Definition: uuid.h:26