7#ifndef MI_BASE_INTERFACE_MERGER_H 
    8#define MI_BASE_INTERFACE_MERGER_H 
   53template <
typename MAJOR, 
typename MINOR>
 
   68#if __cplusplus >= 201103L 
   79        if( MAJOR::compare_iid( iid))
 
   81        return MINOR::compare_iid( iid);
 
   96        return static_cast<const T*
>( 
get_interface( 
typename T::IID()));
 
  139    const MAJOR* 
cast_to_major()
 const { 
return static_cast<const MAJOR*
>( 
this); }
 
  154template <
typename MAJOR, 
typename MINOR>
 
  156    const Uuid& interface_id)
 const 
  158    const IInterface* iinterface = MAJOR::get_interface( interface_id);
 
  161    return MINOR::get_interface_static( 
static_cast<const MINOR*
>( 
this), interface_id);
 
  164template <
typename MAJOR, 
typename MINOR>
 
  166    const Uuid& interface_id)
 
  168    IInterface* iinterface = MAJOR::get_interface( interface_id);
 
  171    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:122
const T * get_interface() const
Reimplements mi::base::IInterface::get_interface() const.
Definition: interface_merger.h:94
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:77
Interface_merger<MAJOR, MINOR> Self
Typedef for this type.
Definition: interface_merger.h:66
Uuid get_iid() const
Reimplements mi::base::IInterface::get_iid().
Definition: interface_merger.h:117
mi::Uint32 release() const
Reimplements mi::base::IInterface::release().
Definition: interface_merger.h:127
const MAJOR * cast_to_major() const
Returns a pointer to the MAJOR base class.
Definition: interface_merger.h:139
MAJOR * cast_to_major()
Returns a pointer to the MAJOR base class.
Definition: interface_merger.h:151
T * get_interface()
Reimplements mi::base::IInterface::get_interface().
Definition: interface_merger.h:109
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