YSTest
PreAlpha_b500_20140530
The YSLib Test Project
|
按最近最多使用策略刷新的缓存。 更多...
#include <Cache.hpp>
Public 类型 | |
using | Map = unordered_map< _tKey, _tMapped, _fHash, _fEqual, _tAlloc > |
using | UseList = list< _tKey, _tAlloc > |
using | UseCache = unordered_multimap< _tKey, typename UseList::iterator, _fHash, _fEqual, _tAlloc > |
Public 成员函数 | |
GMRUCache (size_type s=15U) | |
DefDeMoveCtor (GMRUCache) private | |
DefGetter (const ynothrow, size_type, MaxUse, max_use) void SetMaxUse(size_type s) | |
void | clear () ynoexcept |
template<typename... _tParams> | |
pair< typename Map::iterator, bool > | emplace (_tParams &&...args) |
iterator | find (const key_type &k) |
const_iterator | find (const key_type &k) const |
Private 属性 | |
UseList | use_list |
UseCache | use_cache |
size_type | max_use |
保持可以再增加一个缓存项的最大容量。 更多... | |
按最近最多使用策略刷新的缓存。
加入异常安全的复制构造函数。
扩展为 MLU 列表。
using YSLib::GMRUCache< _tKey, _tMapped, _fHash, _fEqual, _tAlloc >::Map = unordered_map<_tKey, _tMapped, _fHash, _fEqual, _tAlloc> |
using YSLib::GMRUCache< _tKey, _tMapped, _fHash, _fEqual, _tAlloc >::UseCache = unordered_multimap<_tKey, typename UseList::iterator, _fHash, _fEqual, _tAlloc> |
using YSLib::GMRUCache< _tKey, _tMapped, _fHash, _fEqual, _tAlloc >::UseList = list<_tKey, _tAlloc> |
|
inlineexplicit |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
private |
|
private |
参考自 YSLib::GMRUCache< YSLib::Drawing::Typeface::BitmapKey, YSLib::Drawing::Typeface::SmallBitmapData, YSLib::Drawing::Typeface::BitmapKeyHash >::clear(), YSLib::GMRUCache< YSLib::Drawing::Typeface::BitmapKey, YSLib::Drawing::Typeface::SmallBitmapData, YSLib::Drawing::Typeface::BitmapKeyHash >::DefDeMoveCtor(), YSLib::GMRUCache< YSLib::Drawing::Typeface::BitmapKey, YSLib::Drawing::Typeface::SmallBitmapData, YSLib::Drawing::Typeface::BitmapKeyHash >::emplace() , 以及 YSLib::GMRUCache< YSLib::Drawing::Typeface::BitmapKey, YSLib::Drawing::Typeface::SmallBitmapData, YSLib::Drawing::Typeface::BitmapKeyHash >::find().
|
mutableprivate |
参考自 YSLib::GMRUCache< YSLib::Drawing::Typeface::BitmapKey, YSLib::Drawing::Typeface::SmallBitmapData, YSLib::Drawing::Typeface::BitmapKeyHash >::clear(), YSLib::GMRUCache< YSLib::Drawing::Typeface::BitmapKey, YSLib::Drawing::Typeface::SmallBitmapData, YSLib::Drawing::Typeface::BitmapKeyHash >::DefDeMoveCtor(), YSLib::GMRUCache< YSLib::Drawing::Typeface::BitmapKey, YSLib::Drawing::Typeface::SmallBitmapData, YSLib::Drawing::Typeface::BitmapKeyHash >::emplace() , 以及 YSLib::GMRUCache< YSLib::Drawing::Typeface::BitmapKey, YSLib::Drawing::Typeface::SmallBitmapData, YSLib::Drawing::Typeface::BitmapKeyHash >::find().