Blender V2.61 - r43446
|
#include <cstddef>
#include "MEM_CacheLimiter.h"
#include "MEM_CacheLimiterC-Api.h"
Go to the source code of this file.
Definition in file MEM_CacheLimiterC-Api.cpp.
Definition at line 52 of file MEM_CacheLimiterC-Api.cpp.
Definition at line 49 of file MEM_CacheLimiterC-Api.cpp.
typedef std::list<MEM_CacheLimiterHandleCClass*, MEM_Allocator<MEM_CacheLimiterHandleCClass* > > list_t |
Definition at line 54 of file MEM_CacheLimiterC-Api.cpp.
static MEM_CacheLimiterCClass* cast | ( | MEM_CacheLimiterC * | l | ) | [inline, static] |
Definition at line 135 of file MEM_CacheLimiterC-Api.cpp.
Referenced by delete_MEM_CacheLimiter(), MEM_CacheLimiter_enforce_limits(), MEM_CacheLimiter_get(), MEM_CacheLimiter_get_refcount(), MEM_CacheLimiter_insert(), MEM_CacheLimiter_ref(), MEM_CacheLimiter_touch(), MEM_CacheLimiter_unmanage(), and MEM_CacheLimiter_unref().
static handle_t* cast | ( | MEM_CacheLimiterHandleC * | l | ) | [inline, static] |
Definition at line 140 of file MEM_CacheLimiterC-Api.cpp.
void delete_MEM_CacheLimiter | ( | MEM_CacheLimiterC * | This | ) |
Delete MEM_CacheLimiter
Frees the memory of the CacheLimiter but does not touch managed objects!
This | "This" pointer |
Definition at line 154 of file MEM_CacheLimiterC-Api.cpp.
References cast().
Referenced by IMB_moviecache_destruct().
static intptr_t& get_max | ( | ) | [static] |
Definition at line 32 of file MEM_CacheLimiterC-Api.cpp.
Referenced by MEM_CacheLimiter_get_maximum(), and MEM_CacheLimiter_set_maximum().
void MEM_CacheLimiter_enforce_limits | ( | MEM_CacheLimiterC * | This | ) |
Free objects until memory constraints are satisfied
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
handle | of object |
Definition at line 196 of file MEM_CacheLimiterC-Api.cpp.
References cast().
intptr_t MEM_CacheLimiter_get_maximum | ( | void | ) |
Definition at line 43 of file MEM_CacheLimiterC-Api.cpp.
References get_max().
Referenced by MEM_CacheLimiter< MEM_CacheLimiterHandleCClass >::enforce_limits(), and free_imbuf_seq().
int MEM_CacheLimiter_get_refcount | ( | MEM_CacheLimiterHandleC * | handle | ) |
Get reference counter.
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
This | "This" pointer, data data object to manage |
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.
handle | of object |
Definition at line 180 of file MEM_CacheLimiterC-Api.cpp.
References cast().
Referenced by IMB_moviecache_put().
void MEM_CacheLimiter_set_maximum | ( | intptr_t | m | ) |
Definition at line 38 of file MEM_CacheLimiterC-Api.cpp.
References get_max().
Referenced by wm_init_userdef().
void MEM_CacheLimiter_touch | ( | MEM_CacheLimiterHandleC * | handle | ) |
Raise priority of object (put it at the tail of the deletion chain)
handle | of 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!
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.
handle | of 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
data_destructor |
Definition at line 145 of file MEM_CacheLimiterC-Api.cpp.
Referenced by IMB_moviecache_init().