32#error This header is in development. Do not use.
48 template <
typename TKey,
typename TValue>
79 void set_read_function(
etl::delegate<key_value_t&(
void)> reader_)
87 void set_write_function(
etl::delegate<
void(
const key_value_t&)> writer_)
95 void set_write_through(
bool write_through_)
100 virtual const T&
read(
const TKey& key)
const = 0;
101 virtual void write(
const TKey& key,
const TValue& value) = 0;
106 typedef ETL_OR_STD::pair<TKey, TValue> key_value_t;
Declaration.
Definition: delegate_cpp03.h:175
bool write_through
If true, the cache should write changed items back to the store immediately. If false then a flush() ...
Definition: icache.h:108
etl::delegate< key_value_t &(void)> * read_store
A function that will read a value from the store into the cache.
Definition: icache.h:110
virtual void flush()=0
The overridden function should write all changed values to the store.
virtual const T & read(const TKey &key) const =0
Reads from the cache. May read from the store using read_store.
etl::delegate< void(const key_value_t &)> * write_store
A function that will write a value from the cache into the store.
Definition: icache.h:111
virtual void write(const TKey &key, const TValue &value)=0
Writes to the cache. May write to the store using write_store.
bitset_ext
Definition: absolute.h:38