RobWorkProject  23.9.11-
Public Types | Public Member Functions | List of all members
Cache< KEY, VAL > Class Template Reference

This class is a template for caching. More...

#include <Cache.hpp>

Public Types

typedef rw::core::Ptr< CachePtr
 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
 

Detailed Description

template<class KEY, class VAL>
class rw::common::Cache< KEY, VAL >

This class is a template for caching.


The documentation for this class was generated from the following file: