cache Class Reference

#include <cache.h>

List of all members.

Public Member Functions

 cache ()
pictureoperator[] (std::string key)
 Get a (new) picture.
bool exists (std::string key)
 Check if a picture exists in cache.
void clean (int max)
 Remove elements from cache when full.
void dump ()
 Write and check all elements inside the cache.
 cache ()
pictureoperator[] (std::string key)
bool exists (std::string key)
void clean (int max)
void dump ()

Public Attributes

hashtable< const
char, picture
data


Detailed Description

Cache images in memory to prevent constant reloading of image files This cache automatically loads files when needed and returns images. It has a cleanup routine that performs cleanup in steps of maximal 10 images so the cleanup won't take too much resources.

Constructor & Destructor Documentation

cache::cache (  ) 

cache::cache (  ) 


Member Function Documentation

picture & cache::operator[] ( std::string  key  ) 

Get a (new) picture.

bool cache::exists ( std::string  key  ) 

Check if a picture exists in cache.

void cache::clean ( int  max  ) 

Remove elements from cache when full.

void cache::dump (  ) 

Write and check all elements inside the cache.

picture& cache::operator[] ( std::string  key  ) 

bool cache::exists ( std::string  key  ) 

void cache::clean ( int  max  ) 

void cache::dump (  ) 


Member Data Documentation

hashtable<const char,picture> cache::data


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

Generated on Tue Jan 1 17:30:01 2008 for cache Class Reference by  doxygen   Visit the project page on SourceForge.net Logo