Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
LRU< Key, Entry > Class Template Reference

#include <cache_adt.h>

Classes

struct  KeyAndEntry
 

Public Member Functions

bool empty () const
 
void add (const Key &key, const Entry &entry)
 
bool find (const Key &key, const Entry **pentry) const
 
void remove (const Key &key)
 
void on_access (Entry &entry)
 
void remove_least_valuable (std::list< Entry > &entry_list)
 

Private Types

typedef std::list< KeyAndEntryList
 
typedef List::iterator It
 
typedef List::const_iterator CIt
 

Private Attributes

List lru
 

Member Typedef Documentation

◆ CIt

template<typename Key , typename Entry >
typedef List::const_iterator LRU< Key, Entry >::CIt
private

◆ It

template<typename Key , typename Entry >
typedef List::iterator LRU< Key, Entry >::It
private

◆ List

template<typename Key , typename Entry >
typedef std::list<KeyAndEntry> LRU< Key, Entry >::List
private

Member Function Documentation

◆ add()

template<typename Key , typename Entry >
void LRU< Key, Entry >::add ( const Key &  key,
const Entry entry 
)
inline

◆ empty()

template<typename Key , typename Entry >
bool LRU< Key, Entry >::empty ( ) const
inline

◆ find()

template<typename Key , typename Entry >
bool LRU< Key, Entry >::find ( const Key &  key,
const Entry **  pentry 
) const
inline

◆ on_access()

template<typename Key , typename Entry >
void LRU< Key, Entry >::on_access ( Entry entry)
inline

◆ remove()

template<typename Key , typename Entry >
void LRU< Key, Entry >::remove ( const Key &  key)
inline

◆ remove_least_valuable()

template<typename Key , typename Entry >
void LRU< Key, Entry >::remove_least_valuable ( std::list< Entry > &  entry_list)
inline

Member Data Documentation

◆ lru

template<typename Key , typename Entry >
List LRU< Key, Entry >::lru
private

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