Base API nvidia_logo_transpbg.gif Up
mi::base::IAllocator Class Referenceabstract

The IAllocator interface class supports allocating and releasing memory dynamically. More...

#include <iallocator.h>

Inheritance diagram for mi::base::IAllocator:

Public Types

typedef Interface_declare< id1, ... > Self
 Own type. More...
 
typedef Uuid_t< id1, ... > IID
 Declares the interface ID (IID) of this interface. More...
 

Public Member Functions

virtual void * malloc (Size size)=0
 Allocates a memory block of the given size. More...
 
virtual void free (void *memory)=0
 Releases the given memory block. More...
 
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 Uuid &iid)
 Compares the interface ID iid against the interface ID of this interface and of its ancestors. More...
 

Detailed Description

The IAllocator interface class supports allocating and releasing memory dynamically.

Different APIs allow to be configured with your own implementation of an allocator to override their internal implementation.

Include File:
#include <mi/base/iallocator.h>

Member Typedef Documentation

 IID

typedef Uuid_t<id1,id2,id3,id4,id5,id6,id7,id8,id9,id10,id11> mi::base::Interface_declare< id1, ... >::IID
inherited

Declares the interface ID (IID) of this interface.

 Self

typedef Interface_declare<id1,id2,id3,id4,id5,id6,id7,id8,id9,id10,id11,IInterface > mi::base::Interface_declare< id1, ... >::Self
inherited

Own type.

Member Function Documentation

 compare_iid()

static bool mi::base::Interface_declare< id1, ... >::compare_iid ( const Uuid iid)
inlinestaticinherited

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

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