Blender V2.61 - r43446
Typedefs | Functions

MEM_CacheLimiterC-Api.h File Reference

Go to the source code of this file.

Typedefs

typedef struct MEM_CacheLimiter_s MEM_CacheLimiterC
typedef struct
MEM_CacheLimiterHandle_s 
MEM_CacheLimiterHandleC
typedef void(* MEM_CacheLimiter_Destruct_Func )(void *)
typedef intptr_t(* MEM_CacheLimiter_DataSize_Func )(void *)

Functions

void MEM_CacheLimiter_set_maximum (int m)
int MEM_CacheLimiter_get_maximum (void)
MEM_CacheLimiterCnew_MEM_CacheLimiter (MEM_CacheLimiter_Destruct_Func data_destructor, MEM_CacheLimiter_DataSize_Func data_size)
void delete_MEM_CacheLimiter (MEM_CacheLimiterC *This)
MEM_CacheLimiterHandleCMEM_CacheLimiter_insert (MEM_CacheLimiterC *This, void *data)
void MEM_CacheLimiter_enforce_limits (MEM_CacheLimiterC *This)
void MEM_CacheLimiter_unmanage (MEM_CacheLimiterHandleC *handle)
void MEM_CacheLimiter_touch (MEM_CacheLimiterHandleC *handle)
void MEM_CacheLimiter_ref (MEM_CacheLimiterHandleC *handle)
void MEM_CacheLimiter_unref (MEM_CacheLimiterHandleC *handle)
int MEM_CacheLimiter_get_refcount (MEM_CacheLimiterHandleC *handle)
void * MEM_CacheLimiter_get (MEM_CacheLimiterHandleC *handle)

Detailed Description

Definition in file MEM_CacheLimiterC-Api.h.


Typedef Documentation

typedef intptr_t(* MEM_CacheLimiter_DataSize_Func)(void *)

Definition at line 45 of file MEM_CacheLimiterC-Api.h.

typedef void(* MEM_CacheLimiter_Destruct_Func)(void *)

Definition at line 42 of file MEM_CacheLimiterC-Api.h.

typedef struct MEM_CacheLimiter_s MEM_CacheLimiterC

Definition at line 38 of file MEM_CacheLimiterC-Api.h.

typedef struct MEM_CacheLimiterHandle_s MEM_CacheLimiterHandleC

Definition at line 39 of file MEM_CacheLimiterC-Api.h.


Function Documentation

void delete_MEM_CacheLimiter ( MEM_CacheLimiterC This)

Delete MEM_CacheLimiter

Frees the memory of the CacheLimiter but does not touch managed objects!

Parameters:
This"This" pointer

Definition at line 154 of file MEM_CacheLimiterC-Api.cpp.

References cast().

Referenced by IMB_moviecache_destruct().

void MEM_CacheLimiter_enforce_limits ( MEM_CacheLimiterC This)

Free objects until memory constraints are satisfied

Parameters:
This"This" pointer

Definition at line 165 of file MEM_CacheLimiterC-Api.cpp.

References cast(), MEM_CacheLimiter< T >::enforce_limits(), and MEM_CacheLimiterCClass::get_cache().

Referenced by IMB_moviecache_put().

void* MEM_CacheLimiter_get ( MEM_CacheLimiterHandleC handle)

Get pointer to managed object

Parameters:
handleof object

Definition at line 196 of file MEM_CacheLimiterC-Api.cpp.

References cast().

int MEM_CacheLimiter_get_maximum ( void  )
int MEM_CacheLimiter_get_refcount ( MEM_CacheLimiterHandleC handle)

Get reference counter.

Parameters:
This"This" pointer, handle of object

Definition at line 190 of file MEM_CacheLimiterC-Api.cpp.

References cast().

MEM_CacheLimiterHandleC* MEM_CacheLimiter_insert ( MEM_CacheLimiterC This,
void *  data 
)

Manage object

Parameters:
This"This" pointer, data data object to manage
Returns:
CacheLimiterHandle to ref, unref, touch the managed object

Definition at line 159 of file MEM_CacheLimiterC-Api.cpp.

References cast(), and MEM_CacheLimiterCClass::insert().

Referenced by IMB_moviecache_put().

void MEM_CacheLimiter_ref ( MEM_CacheLimiterHandleC handle)

Increment reference counter. Objects with reference counter != 0 are _not_ deleted.

Parameters:
handleof object

Definition at line 180 of file MEM_CacheLimiterC-Api.cpp.

References cast().

Referenced by IMB_moviecache_put().

void MEM_CacheLimiter_set_maximum ( int  m)
void MEM_CacheLimiter_touch ( MEM_CacheLimiterHandleC handle)

Raise priority of object (put it at the tail of the deletion chain)

Parameters:
handleof object

Definition at line 175 of file MEM_CacheLimiterC-Api.cpp.

References cast().

Referenced by IMB_moviecache_get().

void MEM_CacheLimiter_unmanage ( MEM_CacheLimiterHandleC handle)

Unmanage object previously inserted object. Does _not_ delete managed object!

Parameters:
This"This" pointer, handle of object

Definition at line 170 of file MEM_CacheLimiterC-Api.cpp.

References cast().

Referenced by moviecache_valfree().

void MEM_CacheLimiter_unref ( MEM_CacheLimiterHandleC handle)

Decrement reference counter. Objects with reference counter != 0 are _not_ deleted.

Parameters:
handleof object

Definition at line 185 of file MEM_CacheLimiterC-Api.cpp.

References cast().

Referenced by IMB_moviecache_put().

MEM_CacheLimiterC* new_MEM_CacheLimiter ( MEM_CacheLimiter_Destruct_Func  data_destructor,
MEM_CacheLimiter_DataSize_Func  data_size 
)

Create new MEM_CacheLimiter object managed objects are destructed with the data_destructor

Parameters:
data_destructor
Returns:
A new MEM_CacheLimter object

Definition at line 145 of file MEM_CacheLimiterC-Api.cpp.

Referenced by IMB_moviecache_init().