add CachedFactory, remove gcc warnings
git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@721 7ec92016-0320-0410-acc4-a06ded1c099a
This commit is contained in:
parent
78febe17ec
commit
8e2c06d853
1 changed files with 10 additions and 2 deletions
|
@ -145,9 +145,9 @@ namespace Loki
|
||||||
private:
|
private:
|
||||||
typedef std::vector< clock_t > Vector;
|
typedef std::vector< clock_t > Vector;
|
||||||
Vector m_vTimes;
|
Vector m_vTimes;
|
||||||
clock_t lastUpdate;
|
|
||||||
unsigned maxCreation;
|
unsigned maxCreation;
|
||||||
clock_t timeValidity;
|
clock_t timeValidity;
|
||||||
|
clock_t lastUpdate;
|
||||||
|
|
||||||
void cleanVector()
|
void cleanVector()
|
||||||
{
|
{
|
||||||
|
@ -326,6 +326,9 @@ namespace Loki
|
||||||
private:
|
private:
|
||||||
typedef EvictionHelper< ST , DT > EH;
|
typedef EvictionHelper< ST , DT > EH;
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
virtual ~EvictLRU(){}
|
||||||
|
|
||||||
// OnStore initialize the counter for the new key
|
// OnStore initialize the counter for the new key
|
||||||
// If the key already exists, the counter is reseted
|
// If the key already exists, the counter is reseted
|
||||||
void onCreate(const DT& key)
|
void onCreate(const DT& key)
|
||||||
|
@ -379,6 +382,8 @@ namespace Loki
|
||||||
typedef typename EH::HitMapItr HitMapItr;
|
typedef typename EH::HitMapItr HitMapItr;
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
virtual ~EvictAging(){}
|
||||||
|
|
||||||
// OnStore initialize the counter for the new key
|
// OnStore initialize the counter for the new key
|
||||||
// If the key already exists, the counter is reseted
|
// If the key already exists, the counter is reseted
|
||||||
void onCreate(const DT& key){
|
void onCreate(const DT& key){
|
||||||
|
@ -437,6 +442,9 @@ namespace Loki
|
||||||
typedef typename std::vector< DT >::iterator iterator;
|
typedef typename std::vector< DT >::iterator iterator;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
virtual ~EvictRandom(){};
|
||||||
|
|
||||||
void onCreate(const DT&){
|
void onCreate(const DT&){
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue