Public Member Functions | |
void | add (KeyType key, const ValueType *value) |
add object to cache. It is caller responsibility to check that object is not yet there. | |
void | clear () |
emptify cache, delete values associated to Key | |
const ValueType * | get (KeyType key) |
void | resize (int size) |
SimpleCache (unsigned int initSize) | |
~SimpleCache () | |
Private Member Functions | |
SimpleCache (const SimpleCache &) | |
Private Attributes | |
std::vector< const ValueType * > | theContainer |
Definition at line 18 of file LayerHitMapCache.h.
LayerHitMapCache::SimpleCache::SimpleCache | ( | unsigned int | initSize | ) | [inline] |
Definition at line 22 of file LayerHitMapCache.h.
: theContainer(initSize, nullptr){}
LayerHitMapCache::SimpleCache::~SimpleCache | ( | ) | [inline] |
LayerHitMapCache::SimpleCache::SimpleCache | ( | const SimpleCache & | ) | [inline, private] |
Definition at line 38 of file LayerHitMapCache.h.
{ }
void LayerHitMapCache::SimpleCache::add | ( | KeyType | key, |
const ValueType * | value | ||
) | [inline] |
add object to cache. It is caller responsibility to check that object is not yet there.
Definition at line 27 of file LayerHitMapCache.h.
References combine::key, resize(), theContainer, and relativeConstraints::value.
Referenced by LayerHitMapCache::operator()().
{ if (key>=int(theContainer.size())) resize(key+1); theContainer[key]=value; }
void LayerHitMapCache::SimpleCache::clear | ( | void | ) | [inline] |
emptify cache, delete values associated to Key
Definition at line 32 of file LayerHitMapCache.h.
References theContainer, and findQualityFiles::v.
Referenced by LayerHitMapCache::clear(), and ~SimpleCache().
{ for ( auto & v : theContainer) { delete v; v=nullptr;} }
const ValueType* LayerHitMapCache::SimpleCache::get | ( | KeyType | key | ) | [inline] |
Definition at line 25 of file LayerHitMapCache.h.
References combine::key, and theContainer.
Referenced by LayerHitMapCache::operator()().
{ return theContainer[key];}
void LayerHitMapCache::SimpleCache::resize | ( | int | size | ) | [inline] |
Definition at line 24 of file LayerHitMapCache.h.
References theContainer.
Referenced by add().
{ theContainer.resize(size,nullptr); }
std::vector< const ValueType *> LayerHitMapCache::SimpleCache::theContainer [private] |