DiCE API nvidia_logo_transpbg.gif Up
mi::neuraylib::Base< id1, ... > Class Template Reference

This mixin class can be used to implement the mi::base::IInterface interface. More...

#include <dice.h>

Inheritance diagram for mi::neuraylib::Base< id1, ... >:

Public Types

typedef Base< id1, ... > Self
 Own type. More...
 
typedef base::Uuid_t< id1, ... > IID
 Declares the interface ID. More...
 
- Public Types inherited from mi::base::IInterface
typedef Uuid_t<0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0> IID
 Declares the interface ID (IID) of this interface. More...
 

Public Member Functions

virtual const base::IInterfaceget_interface (const base::Uuid &interface_id) const
 Acquires a const interface. More...
 
virtual base::IInterfaceget_interface (const base::Uuid &interface_id)
 Acquires a mutable interface. More...
 
virtual base::Uuid get_class_id () const
 Returns the class ID corresponding to the template parameters of this mixin class. More...
 
- Public Member Functions inherited from mi::base::Interface_implement< base::IInterface >
 Interface_implement (Uint32 initial=1)
 Constructor. More...
 
 Interface_implement (const Interface_implement< base::IInterface > &other)
 Copy constructor. More...
 
 Interface_implement (Interface_implement &&other)
 Move constructor. More...
 
Interface_implement< base::IInterface > & operator= (const Interface_implement< base::IInterface > &other)
 Assignment operator. More...
 
Interface_implementoperator= (Interface_implement &&other)
 Move assignment. More...
 
virtual Uint32 retain () const
 Increments the reference count. More...
 
virtual Uint32 release () const
 Decrements the reference count. More...
 
virtual const IInterfaceget_interface (const Uuid &interface_id) const
 Acquires a const interface. More...
 
virtual IInterfaceget_interface (const Uuid &interface_id)
 Acquires a mutable interface. More...
 
Uuid get_iid () const
 Returns the interface ID of the most derived interface. More...
 
- Public Member Functions inherited from mi::base::IInterface
virtual Uint32 retain () const =0
 Increments the reference count. More...
 
virtual Uint32 release () const =0
 Decrements the reference count. More...
 
virtual const IInterfaceget_interface (const Uuid &interface_id) const =0
 Acquires a const interface from another. More...
 
template<class T>
const T * get_interface () const
 Acquires a const interface from another. More...
 
virtual IInterfaceget_interface (const Uuid &interface_id)=0
 Acquires a mutable interface from another. More...
 
template<class T>
T * get_interface ()
 Acquires a mutable interface from another. More...
 
virtual Uuid get_iid () const =0
 Returns the interface ID of the most derived interface. More...
 

Static Public Member Functions

static bool compare_iid (const base::Uuid &iid)
 Compares the interface ID iid against the interface ID of this interface and its ancestors. More...
 
- Static Public Member Functions inherited from mi::base::IInterface
static bool compare_iid (const Uuid &iid)
 Compares the interface ID iid against the interface ID of this interface. More...
 

Additional Inherited Members

- Protected Member Functions inherited from mi::base::Interface_implement< base::IInterface >
Atom32refcount () const
 Get the current refcount. More...
 

Detailed Description

template<Uint32 id1, Uint16 id2, Uint16 id3, Uint8 id4, Uint8 id5, Uint8 id6, Uint8 id7, Uint8 id8, Uint8 id9, Uint8 id10, Uint8 id11, class I = base::IInterface>
class mi::neuraylib::Base< id1, ... >

This mixin class can be used to implement the mi::base::IInterface interface.

This mixin class provides a default implementation of some of the pure virtual methods of the mi::base::IInterface interface. It is used by the mixin classes mi::neuraylib::IElement, mi::neuraylib::IJob, and mi::neuraylib::IFragmented_job.

You are advised not to use this classes directly. Either use the three mixin classes mentioned above, or to implement a generic interface, use mi::base::Interface_implement.

Member Typedef Documentation

 IID

template<Uint32 id1, Uint16 id2, Uint16 id3, Uint8 id4, Uint8 id5, Uint8 id6, Uint8 id7, Uint8 id8, Uint8 id9, Uint8 id10, Uint8 id11, class I = base::IInterface>
typedef base::Uuid_t<id1,id2,id3,id4,id5,id6,id7,id8,id9,id10,id11> mi::neuraylib::Base< id1, ... >::IID

Declares the interface ID.

 Self

template<Uint32 id1, Uint16 id2, Uint16 id3, Uint8 id4, Uint8 id5, Uint8 id6, Uint8 id7, Uint8 id8, Uint8 id9, Uint8 id10, Uint8 id11, class I = base::IInterface>
typedef Base<id1,id2,id3,id4,id5,id6,id7,id8,id9,id10,id11,I> mi::neuraylib::Base< id1, ... >::Self

Own type.

Member Function Documentation

 compare_iid()

template<Uint32 id1, Uint16 id2, Uint16 id3, Uint8 id4, Uint8 id5, Uint8 id6, Uint8 id7, Uint8 id8, Uint8 id9, Uint8 id10, Uint8 id11, class I = base::IInterface>
static bool mi::neuraylib::Base< id1, ... >::compare_iid ( const base::Uuid iid)
inlinestatic

Compares the interface ID iid against the interface ID of this interface and its ancestors.

Returns
true if iid == IID() or is equal to one of the interface IDs of its ancestors, and false otherwise.

 get_class_id()

template<Uint32 id1, Uint16 id2, Uint16 id3, Uint8 id4, Uint8 id5, Uint8 id6, Uint8 id7, Uint8 id8, Uint8 id9, Uint8 id10, Uint8 id11, class I = base::IInterface>
virtual base::Uuid mi::neuraylib::Base< id1, ... >::get_class_id ( ) const
inlinevirtual

Returns the class ID corresponding to the template parameters of this mixin class.

 get_interface() [1/2]

template<Uint32 id1, Uint16 id2, Uint16 id3, Uint8 id4, Uint8 id5, Uint8 id6, Uint8 id7, Uint8 id8, Uint8 id9, Uint8 id10, Uint8 id11, class I = base::IInterface>
virtual base::IInterface * mi::neuraylib::Base< id1, ... >::get_interface ( const base::Uuid interface_id)
inlinevirtual

Acquires a mutable interface.

If this interface is derived from or is the interface with the passed interface_id, then return a non-NULL mi::base::IInterface* that can be casted via static_cast to an interface pointer of the interface type corresponding to the passed interface_id. Otherwise return NULL.

In the case of a non-NULL return value, the caller receives ownership of the new interface pointer, whose reference count has been retained once. The caller must release the returned interface pointer at the end to prevent a memory leak.

Reimplemented from mi::base::Interface_implement< base::IInterface >.

 get_interface() [2/2]

template<Uint32 id1, Uint16 id2, Uint16 id3, Uint8 id4, Uint8 id5, Uint8 id6, Uint8 id7, Uint8 id8, Uint8 id9, Uint8 id10, Uint8 id11, class I = base::IInterface>
virtual const base::IInterface * mi::neuraylib::Base< id1, ... >::get_interface ( const base::Uuid interface_id) const
inlinevirtual

Acquires a const interface.

If this interface is derived from or is the interface with the passed interface_id, then return a non-NULL const mi::base::IInterface* that can be casted via static_cast to an interface pointer of the interface type corresponding to the passed interface_id. Otherwise return NULL.

In the case of a non-NULL return value, the caller receives ownership of the new interface pointer, whose reference count has been retained once. The caller must release the returned interface pointer at the end to prevent a memory leak.

Reimplemented from mi::base::Interface_implement< base::IInterface >.