This mixin class can be used to implement the mi::base::IInterface interface. More...
#include <dice.h>
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::IInterface * | get_interface (const base::Uuid &interface_id) const |
Acquires a const interface. More... | |
virtual base::IInterface * | get_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_implement & | operator= (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 IInterface * | get_interface (const Uuid &interface_id) const |
Acquires a const interface. More... | |
virtual IInterface * | get_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 IInterface * | get_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 IInterface * | get_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 > | |
Atom32 & | refcount () const |
Get the current refcount. More... | |
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.
typedef base::Uuid_t<id1,id2,id3,id4,id5,id6,id7,id8,id9,id10,id11> mi::neuraylib::Base< id1, ... >::IID |
Declares the interface ID.
typedef Base<id1,id2,id3,id4,id5,id6,id7,id8,id9,id10,id11,I> mi::neuraylib::Base< id1, ... >::Self |
Own type.
|
inlinestatic |
Compares the interface ID iid
against the interface ID of this interface and its ancestors.
true
if iid
== IID()
or is equal to one of the interface IDs of its ancestors, and false
otherwise.
|
inlinevirtual |
Returns the class ID corresponding to the template parameters of this mixin class.
|
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 >.
|
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 >.