Rosetta
|
#include <mutable_cache.hh>
Public Member Functions | |
MutableCache ()=default | |
~MutableCache ()=default | |
MutableCache (MutableCache const &src) | |
MutableCache (MutableCache &&src) | |
MutableCache & | operator= (MutableCache const &src) |
MutableCache & | operator= (MutableCache &&src) |
bool | has (K const &key) const |
V const & | get (K const &key) const |
void | add_if_missing (K const &key, V const &value) |
Add the key:value pair to the map, but only if the key isn't already present. More... | |
void | add_if_missing (K const &key, std::function< V() > creator) |
Add a key:value pair to the map if the key isn't present. The creator function will be called to generate the value. More... | |
void | add_if_missing (K const &key, std::function< V(K const &) > creator) |
Add a key:value pair to the map if the key isn't present. The creator function will be called to generate the value. More... | |
Private Attributes | |
std::map< K, V > | data_ |
|
default |
|
default |
utility::thread::MutableCache< K, V >::MutableCache | ( | MutableCache< K, V > const & | src | ) |
References utility::thread::MutableCache< K, V >::data_.
utility::thread::MutableCache< K, V >::MutableCache | ( | MutableCache< K, V > && | src | ) |
void utility::thread::MutableCache< K, V >::add_if_missing | ( | K const & | key, |
std::function< V() > | creator | ||
) |
Add a key:value pair to the map if the key isn't present. The creator function will be called to generate the value.
References subloop_histogram::key.
void utility::thread::MutableCache< K, V >::add_if_missing | ( | K const & | key, |
std::function< V(K const &) > | creator | ||
) |
Add a key:value pair to the map if the key isn't present. The creator function will be called to generate the value.
References subloop_histogram::key.
void utility::thread::MutableCache< K, V >::add_if_missing | ( | K const & | key, |
V const & | value | ||
) |
Add the key:value pair to the map, but only if the key isn't already present.
References subloop_histogram::key, and value.
V const & utility::thread::MutableCache< K, V >::get | ( | K const & | key | ) | const |
References subloop_histogram::key.
bool utility::thread::MutableCache< K, V >::has | ( | K const & | key | ) | const |
References subloop_histogram::key.
MutableCache< K, V > & utility::thread::MutableCache< K, V >::operator= | ( | MutableCache< K, V > && | src | ) |
References basic::options::OptionKeys::stepwise::move.
MutableCache< K, V > & utility::thread::MutableCache< K, V >::operator= | ( | MutableCache< K, V > const & | src | ) |
References utility::thread::MutableCache< K, V >::data_.
|
private |