FX::QCache< type > Class Template Reference

#include <qcache.h>

Inheritance diagram for FX::QCache< type >:

FX::FXLRUCache< dictbase, type > List of all members.

Detailed Description

template<class type>
class FX::QCache< type >

An implementation of Qt's QCache.

See also:
FX::QDict

Definition at line 39 of file qcache.h.

Public Types

typedef dictbase::KeyType KeyType
typedef dictbase::ItemType FundamentalDictType

Public Member Functions

 QCache (FXuint maxCost=100, FXuint size=13, bool caseSensitive=true, bool autodel=false)
void setAutoDelete (bool a)
bool dynamic () const throw ()
void setDynamic (bool v) const throw ()
FXuint maxCost () const throw ()
void setMaxCost (FXuint newmax)
FXuint totalCost () const throw ()
void cacheStats (float *hitrate, float *churn) const throw ()
void statistics () const
bool insert (KeyTypeAsParam k, TypeAsParam d, FXint itemcost=1)
bool remove (KeyTypeAsParam k)
TypeAsReturn take (KeyTypeAsParam k)
TypeAsReturn find (KeyTypeAsParam k, bool tofront=true) const
TypeAsReturn operator[] (KeyTypeAsParam k) const

Protected Types

typedef FundamentalDictTypeDictType
typedef Generic::select< Generic::sameType<
type, Generic::NullType
>::value, DictType, type
>::value 
Type
typedef Generic::TraitsBasic<
Type
TypeTraits
typedef Generic::TraitsBasic<
KeyType >::asROParam 
KeyTypeAsParam
typedef TypeTraits::asROParam TypeAsParam
typedef Generic::leastIndir<
Type >::value * 
TypeAsReturn
typedef FXLRUCacheImpl::getPtr<
Type, TypeAsParam, TypeTraits::isValue > 
CacheItemBase

Protected Member Functions

virtual void purgeLFU ()
virtual void deleteItem (DictType d)

Protected Attributes

FXuint topmax
FXuint maximum
FXuint cost
bool amDynamic
std::list< CacheItem > cache
FX::FXLRUCache::stats_t stats


The documentation for this class was generated from the following file:
(C) 2002-2009 Niall Douglas. Some parts (C) to assorted authors.
Generated on Fri Nov 20 18:37:35 2009 for TnFOX by doxygen v1.4.7