Main Page   Modules   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages   Examples  

lru< T1, T2 > Class Template Reference
[GLT Misc]

Templated LRU (Least Recently Used) Cache. More...

#include <lru.h>

Inheritance diagram for lru< T1, T2 >:

Inheritance graph
[legend]
List of all members.

Public Methods

 lru ()
 Constructor.

 ~lru ()
 Destructor.

const uint32 size () const
 Return the current size of container.

const T2 & front () const
 Front most (most recently used) item.

const T2 & back () const
 Back most (least recently used) item.

const T2 pop_front ()
 Pop front item (most recently used).

const T2 pop_back ()
 Pop back item (least recently used).

T2 & insert (const T1 &first)
 Recycle last recently used (LRU) item.

const T2 & insert (const T1 &first, const T2 &second)
 Insert new item.

T2 * find (const T1 &first, bool touch=true)
 Lookup cached item.

const T2 & operator[] (const uint32 n) const
 Random access to items.

void clear ()
 Clear cache.


Detailed Description

template<class T1, class T2>
class lru< T1, T2 >

Templated LRU (Least Recently Used) Cache.

Definition at line 61 of file lru.h.


The documentation for this class was generated from the following file:
Generated on Tue Nov 5 11:11:49 2002 for GLT by doxygen1.2.18