Overview   Project   Class   Tree   Deprecated   Index 
0 A.D.
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD

lib
Class Cache

   in cache_adt.h

template < typename Key , typename Item , template < typename Key , class Entry > class Manager = Landlord_Cached , class Divider = Divider_Naive > class Cache


Inner Classes, Typedefs, and Enums
struct Cache::CacheEntry
          
typedef Cache::Entry
          
 
Field Summary
private std::list< Cache::Entry > entries_awaiting_eviction
          
private Manager< Key, Cache::Entry > mgr
          
 
Constructor Summary
Cache()
          
 
Method Summary
 void add( Key key, Item item, size_t size, uint cost )
          
 bool empty() const
          
 void remove( Key key )
          
 bool remove_least_valuable( Item* pItem = 0, size_t* pSize = 0 )
          
 bool retrieve( Key key, Item& item, size_t* psize = 0, bool refill_credit = true )
          
 

Field Detail

entries_awaiting_eviction

private std::list< Cache::Entry > entries_awaiting_eviction;

mgr

private Manager< Key, Cache::Entry > mgr;


Constructor Detail

Cache

public Cache();


Method Detail

add

public void add( Key key, Item item, size_t size, uint cost );

empty

public bool empty() const;

remove

public void remove( Key key );

remove_least_valuable

public bool remove_least_valuable( Item* pItem = 0, size_t* pSize = 0 );

retrieve

public bool retrieve( Key key, Item& item, size_t* psize = 0, bool refill_credit = true );

 Overview   Project   Class   Tree   Deprecated   Index 
0 A.D.
Generated on September 04, 2007 at 18:13
CppDoc v2.4.0
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD