7#ifndef MI_BASE_INTERFACE_MERGER_H
8#define MI_BASE_INTERFACE_MERGER_H
53template <
typename MAJOR,
typename MINOR>
77 if( MAJOR::compare_iid( iid))
79 return MINOR::compare_iid( iid);
94 return static_cast<const T*
>(
get_interface(
typename T::IID()));
137 const MAJOR*
cast_to_major()
const {
return static_cast<const MAJOR*
>(
this); }
152template <
typename MAJOR,
typename MINOR>
154 const Uuid& interface_id)
const
156 const IInterface* iinterface = MAJOR::get_interface( interface_id);
159 return MINOR::get_interface_static(
static_cast<const MINOR*
>(
this), interface_id);
162template <
typename MAJOR,
typename MINOR>
164 const Uuid& interface_id)
166 IInterface* iinterface = MAJOR::get_interface( interface_id);
169 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:120
const T * get_interface() const
Reimplements mi::base::IInterface::get_interface() const.
Definition: interface_merger.h:92
static bool compare_iid(const Uuid &iid)
Reimplements mi::base::IInterface::compare_iid().
Definition: interface_merger.h:75
MAJOR MAJOR_BASE
Typedef for the MAJOR base class.
Definition: interface_merger.h:60
Uuid get_iid() const
Reimplements mi::base::IInterface::get_iid().
Definition: interface_merger.h:115
mi::Uint32 release() const
Reimplements mi::base::IInterface::release().
Definition: interface_merger.h:125
const MAJOR * cast_to_major() const
Returns a pointer to the MAJOR base class.
Definition: interface_merger.h:137
MAJOR * cast_to_major()
Returns a pointer to the MAJOR base class.
Definition: interface_merger.h:149
T * get_interface()
Reimplements mi::base::IInterface::get_interface().
Definition: interface_merger.h:107
MINOR MINOR_BASE
Typedef for the MINOR base class.
Definition: interface_merger.h:63
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: base.h:34
A 128 bit representation of a universally unique identifier (UUID or GUID).
Definition: uuid.h:26