Public Member Functions | Public Attributes

gui2::tvalue Struct Reference

Value type for the cache. More...

Collaboration diagram for gui2::tvalue:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 tvalue (const surface &surf)

Public Attributes

const surface surf
 The cached image.
unsigned age
 The age of the image.

Detailed Description

Value type for the cache.

Definition at line 73 of file minimap.cpp.


Constructor & Destructor Documentation

gui2::tvalue::tvalue ( const surface surf  )  [inline]

Definition at line 75 of file minimap.cpp.


Member Data Documentation

The age of the image.

Every time an image is used its age is increased by one. Once the cache is full 25% of the cache is emptied. This is done by halving the age of the items in the cache and then erase the 25% with the lowest age. If items have the same age their order is unspecified.

Definition at line 92 of file minimap.cpp.

The cached image.

Definition at line 82 of file minimap.cpp.


The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Fri May 25 2012 01:22:27 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs