[an error occurred while processing this directive]
Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

ImageCache Class Reference

This is a cache for all the images we use. More...

#include <ImageCache.h>

List of all members.

Public Types

typedef boost::shared_ptr<
 a shared pointer to the entry

Public Member Functions

virtual ~ImageCache ()
EntryPtr getImage (const std::string &filename)
 get a image.
EntryPtr getSmallImage (const std::string &filename)
 get an small image.
void removeImage (const std::string &filename)
 remove a specific image (and dependant images) from the cache
void flush ()
 release all images in the cache.
void softFlush ()
 a soft version of flush.
void setProgressDisplay (utils::MultiProgressDisplay *disp)

Static Public Member Functions

ImageCachegetInstance ()
 get the global ImageCache object

Detailed Description

This is a cache for all the images we use.

is a singleton for easy access from everywhere. The cache is used as an image source, that needs to know how to reproduce the requested images, in case that they have been deleted.

: implement a strategy for smart deletion of images

: add more advanced key, that stores access statistics and so on.

Member Typedef Documentation

typedef boost::shared_ptr<Entry> ImageCache::EntryPtr

a shared pointer to the entry

Constructor & Destructor Documentation

ImageCache::~ImageCache  )  [virtual]


Member Function Documentation

void ImageCache::flush  ) 

release all images in the cache.

useful on project load, or maybe before stitching really big pictures

ImageCache::EntryPtr ImageCache::getImage const std::string &  filename  ) 

get a image.

it will be loaded if its not already in the cache

Hold the EntryPtr as long as the image data is needed!

ImageCache & ImageCache::getInstance  )  [static]

get the global ImageCache object

ImageCache::EntryPtr ImageCache::getSmallImage const std::string &  filename  ) 

get an small image.

This image is 512x512 pixel maximum and can be used for icons and different previews. It is directly derived from the original.

void ImageCache::removeImage const std::string &  filename  ) 

remove a specific image (and dependant images) from the cache

void ImageCache::setProgressDisplay utils::MultiProgressDisplay *  disp  )  [inline]

void ImageCache::softFlush  ) 

a soft version of flush.

Releases some images if they go over a certain threshold

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

Generated on Mon Sep 20 01:01:33 2010 for Hugintrunk by doxygen