HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TIL_ImageCache Class Reference

#include <TIL_ImageCache.h>

+ Inheritance diagram for TIL_ImageCache:

Public Member Functions

 TIL_ImageCache ()
 
 ~TIL_ImageCache ()
 
void setCacheLimit (bool enable)
 
void setCacheSize (unsigned size_in_kb)
 
int64 getCurrentSize () const
 
int64 getMaxSize () const
 
void addToCache (TIL_Image *image)
 
void returnToCache (TIL_Image *&image)
 
void returnToCache (const TIL_Raster *r)
 
void removeSourceFromCache (TIL_ImageSource *source)
 
void removeFrameFromCache (TIL_ImageSource *source, int fr)
 
TIL_ImagegetImageFromCache (TIL_ImageState *match, bool usedscaled=false, UT_FilterType f=UT_FILTER_BOX, bool bump=true)
 
void clearImageCache (bool force_all=false)
 
int getImage (TIL_Image *&image, TIL_ImageSource *source, const char *plane, exint planeindex, float t, void *look, bool updateflag, const TIL_GetImageOptions &opts=TIL_GetImageOptions())
 
void dumpCache (std::ostream &os)
 
virtual int64 utReduceCacheSizeBy (int64 amount)
 
- Public Member Functions inherited from UT_Cache
 UT_Cache ()
 
virtual ~UT_Cache ()
 
void utClearCache ()
 
virtual bool utHasMinSize () const
 
virtual int64 utGetMinSize () const
 
virtual void utSetMinSize (int64)
 
virtual bool utUpdateCacheInfo ()
 

Static Public Member Functions

static int64 getSystemMaxSize ()
 
static void setUpdateCallback (void(*callback)(void *, TIL_Raster *, int, int, float, float))
 
- Static Public Member Functions inherited from UT_Cache
static const UT_ValArray
< UT_Cache * > & 
utGetCacheList ()
 get the list of caches More...
 
static void setCacheAddRemoveCB (void(*callback)(void *), void *data)
 callback to be called when a cache is added or deleted. More...
 
static int64 utClearSpaceFromCaches (int64 amount)
 this method attempts to free up 'amount' bytes from all the caches. More...
 

Protected Member Functions

virtual const char * utGetCacheName () const
 required - return the english name for this cache. More...
 
virtual int64 utGetCurrentSize () const
 required - return the current cache size, in bytes More...
 
virtual bool utHasMaxSize () const
 optional - override if the cache has a well defined maximum size More...
 
virtual int64 utGetMaxSize () const
 
virtual void utSetMaxSize (int64 size)
 

Detailed Description

Definition at line 68 of file TIL_ImageCache.h.

Constructor & Destructor Documentation

TIL_ImageCache::TIL_ImageCache ( )
TIL_ImageCache::~TIL_ImageCache ( )

Member Function Documentation

void TIL_ImageCache::addToCache ( TIL_Image image)
void TIL_ImageCache::clearImageCache ( bool  force_all = false)
void TIL_ImageCache::dumpCache ( std::ostream &  os)
int64 TIL_ImageCache::getCurrentSize ( ) const
inline

Definition at line 77 of file TIL_ImageCache.h.

int TIL_ImageCache::getImage ( TIL_Image *&  image,
TIL_ImageSource source,
const char *  plane,
exint  planeindex,
float  t,
void look,
bool  updateflag,
const TIL_GetImageOptions opts = TIL_GetImageOptions() 
)
TIL_Image* TIL_ImageCache::getImageFromCache ( TIL_ImageState match,
bool  usedscaled = false,
UT_FilterType  f = UT_FILTER_BOX,
bool  bump = true 
)
int64 TIL_ImageCache::getMaxSize ( ) const
inline

Definition at line 78 of file TIL_ImageCache.h.

static int64 TIL_ImageCache::getSystemMaxSize ( )
static
void TIL_ImageCache::removeFrameFromCache ( TIL_ImageSource source,
int  fr 
)
void TIL_ImageCache::removeSourceFromCache ( TIL_ImageSource source)
void TIL_ImageCache::returnToCache ( TIL_Image *&  image)
void TIL_ImageCache::returnToCache ( const TIL_Raster r)
void TIL_ImageCache::setCacheLimit ( bool  enable)
void TIL_ImageCache::setCacheSize ( unsigned  size_in_kb)
static void TIL_ImageCache::setUpdateCallback ( void(*)(void *, TIL_Raster *, int, int, float, float)  callback)
static
virtual const char* TIL_ImageCache::utGetCacheName ( ) const
inlineprotectedvirtual

required - return the english name for this cache.

Implements UT_Cache.

Definition at line 119 of file TIL_ImageCache.h.

virtual int64 TIL_ImageCache::utGetCurrentSize ( ) const
inlineprotectedvirtual

required - return the current cache size, in bytes

Implements UT_Cache.

Definition at line 120 of file TIL_ImageCache.h.

virtual int64 TIL_ImageCache::utGetMaxSize ( ) const
inlineprotectedvirtual

Reimplemented from UT_Cache.

Definition at line 122 of file TIL_ImageCache.h.

virtual bool TIL_ImageCache::utHasMaxSize ( ) const
inlineprotectedvirtual

optional - override if the cache has a well defined maximum size

Reimplemented from UT_Cache.

Definition at line 121 of file TIL_ImageCache.h.

virtual int64 TIL_ImageCache::utReduceCacheSizeBy ( int64  amount)
virtual

required - free contents of the cache by amount bytes. Returns the amount of memory (in bytes) actually freed. This does not change the cache size

Implements UT_Cache.

virtual void TIL_ImageCache::utSetMaxSize ( int64  size)
protectedvirtual

Reimplemented from UT_Cache.


The documentation for this class was generated from the following file: