Value type for the cache. More...

Public Member Functions | |
| tvalue (const surface &surf) | |
Public Attributes | |
| const surface | surf |
| The cached image. | |
| unsigned | age |
| The age of the image. | |
Value type for the cache.
Definition at line 73 of file minimap.cpp.
| gui2::tvalue::tvalue | ( | const surface & | surf | ) | [inline] |
Definition at line 75 of file minimap.cpp.
| unsigned gui2::tvalue::age |
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.
| const surface gui2::tvalue::surf |
The cached image.
Definition at line 82 of file minimap.cpp.
| Generated by doxygen 1.7.1 on Fri May 25 2012 01:22:27 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |