17 template<
typename K,
typename V>
33 template <
typename Stream,
typename Operation>
34 inline void SerializationOp(Stream& s, Operation ser_action,
int nType,
int nVersion)
45 template<
typename K,
typename V,
typename Size = u
int32_t>
55 typedef typename list_t::iterator
list_it;
57 typedef typename list_t::const_iterator
list_cit;
59 typedef std::map<K, list_it>
map_t;
61 typedef typename map_t::iterator
map_it;
63 typedef typename map_t::const_iterator
map_cit;
115 item_t& item = *(it->second);
139 item_t& item = *(it->second);
170 template <
typename Stream,
typename Operation>
176 if(ser_action.ForRead()) {
CacheMap< K, V > & operator=(const CacheMap< K, V > &other)
size_type GetMaxSize() const
void SerializationOp(Stream &s, Operation ser_action, int nType, int nVersion)
map_t::const_iterator map_cit
CacheMap(size_type nMaxSizeIn=0)
bool HasKey(const K &key) const
void Insert(const K &key, const V &value)
CacheMap(const CacheMap< K, V > &other)
const list_t & GetItemList() const
void SetMaxSize(size_type nMaxSizeIn)
size_type GetSize() const
list_t::const_iterator list_cit
CacheItem(const K &keyIn, const V &valueIn)
std::map< K, list_it > map_t
bool Get(const K &key, V &value) const
void SerializationOp(Stream &s, Operation ser_action, int nType, int nVersion)
std::list< item_t > list_t