The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Public Attributes | List of all members
gui2::tvalue Struct Reference

Value type for the cache. More...

Public Member Functions

 tvalue (const surface &surf)
 

Public Attributes

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

Detailed Description

Value type for the cache.

Definition at line 92 of file minimap.cpp.

Constructor & Destructor Documentation

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

Definition at line 94 of file minimap.cpp.

Member Data Documentation

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 109 of file minimap.cpp.

const surface gui2::tvalue::surf

The cached image.

Definition at line 99 of file minimap.cpp.


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