Laxkit  0.0.7.1
Public Member Functions | Public Attributes | Private Attributes | Friends
Laxkit::MemCachedObject Class Reference

List of all members.

Public Member Functions

 MemCachedObject ()
virtual int AbleToRegenerate ()=0
virtual int CacheMemoryNeeded ()=0
virtual int CacheRegenerate ()=0
virtual void CacheFree ()=0
virtual void CacheState ()=0
virtual int inc_cache ()
 Increment the cache count, returning the new current count.
virtual int dec_cache ()
 Decrement the cache count, returning the new current count.

Public Attributes

int cachegroup
clock_t lastaccesstime
int id

Private Attributes

int incache
unsigned int cache_count

Friends

class CacheManager

Detailed Description

**********hmmmmm THIS IS A WORK IN PROGRESS!!!

image data can be:

  1. in memory and needed
  2. in memory and not needed, needtoregenerate==0
  3. not in memory and needed. needtoregenerate==1
  4. not in memory and not needed. needtoregenerate==1 doneForNow() will put it in 2 if it was in 1, and do nothing if it was in 3 getImageData() will put it in 1 from any other state

when it is in 2, there needs to be background cache management to free the data if memory is low and it has the oldest access time, putting it into 3.

in states 1 and 3, it is not managed by any cache manager

In order for cache manager to accept an object, is must have able_to_regenerate==1

Todo:
***** think about this!! Imlib2 does memory caching already... how I wonder?

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

Mon Feb 17 2014 11:52:59, Laxkit