lru_cache::LRU_Cache< KEY, VAL > Class Template Reference

#include <ug_lru_cache.h>

Inheritance diagram for lru_cache::LRU_Cache< KEY, VAL >:

Inheritance graph
[legend]

List of all members.

Classes

struct  Record

Public Types

typedef boost::unordered_map
< KEY, uint32_t > 
map_t

Public Member Functions

 LRU_Cache (size_t capacity=1)
size_t capacity () const
size_t size () const
void reserve (size_t s)
SPTR< VAL > get (KEY const &key)
void set (KEY const &key, SPTR< VAL > const &ptr)


Detailed Description

template<typename KEY, typename VAL>
class lru_cache::LRU_Cache< KEY, VAL >

Definition at line 19 of file ug_lru_cache.h.


Member Typedef Documentation

template<typename KEY, typename VAL>
typedef boost::unordered_map<KEY,uint32_t> lru_cache::LRU_Cache< KEY, VAL >::map_t

Definition at line 22 of file ug_lru_cache.h.


Constructor & Destructor Documentation

template<typename KEY, typename VAL>
lru_cache::LRU_Cache< KEY, VAL >::LRU_Cache ( size_t  capacity = 1  )  [inline]

Definition at line 62 of file ug_lru_cache.h.


Member Function Documentation

template<typename KEY, typename VAL>
size_t lru_cache::LRU_Cache< KEY, VAL >::capacity (  )  const [inline]

Definition at line 63 of file ug_lru_cache.h.

Referenced by lru_cache::LRU_Cache< uint64_t, vec_ppair >::LRU_Cache().

Here is the caller graph for this function:

template<typename KEY, typename VAL>
SPTR<VAL> lru_cache::LRU_Cache< KEY, VAL >::get ( KEY const &  key  )  [inline]

Definition at line 68 of file ug_lru_cache.h.

Referenced by Moses::sapt::StatsCollector< Token >::process().

Here is the caller graph for this function:

template<typename KEY, typename VAL>
void lru_cache::LRU_Cache< KEY, VAL >::reserve ( size_t  s  )  [inline]

Definition at line 65 of file ug_lru_cache.h.

Referenced by lru_cache::LRU_Cache< uint64_t, vec_ppair >::LRU_Cache().

Here is the caller graph for this function:

template<typename KEY, typename VAL>
void lru_cache::LRU_Cache< KEY, VAL >::set ( KEY const &  key,
SPTR< VAL > const &  ptr 
) [inline]

Definition at line 83 of file ug_lru_cache.h.

Referenced by Moses::sapt::StatsCollector< Token >::process().

Here is the caller graph for this function:

template<typename KEY, typename VAL>
size_t lru_cache::LRU_Cache< KEY, VAL >::size (  )  const [inline]

Definition at line 64 of file ug_lru_cache.h.


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

Generated on Thu Jul 6 00:32:49 2017 for Moses by  doxygen 1.5.9