![]() |
RobWorkProject
24.12.4-
|
This class is a template for caching. More...
#include <Cache.hpp>
Public Types | |
typedef rw::core::Ptr< Cache > | Ptr |
smart pointer type to this class | |
Public Member Functions | |
Cache () | |
default constructor | |
virtual | ~Cache () |
default destructor | |
bool | isInCache (const KEY &id) |
Tests whether a key is present in the cache. | |
bool | has (const KEY &id) |
tests if the key id is in the cache | |
rw::core::Ptr< VAL > | get (const KEY &key) |
gets the value that is associated with the key | |
void | add (const KEY &key, VAL *val) |
Ads a value to a key that was aquired at some specific time. The rights to val is taken ower by this class. | |
void | add (const KEY &key, rw::core::Ptr< VAL > &val) |
Ads a value to a key that was aquired at some specific time. The rights to value is not changed. | |
void | remove (const KEY &key) |
remove all values-key pairs that match key | |
void | clear () |
clear all value-key pairs from this Cache | |
This class is a template for caching.