CAF
0.17.6
|
Thread-safe container for mapping atoms to arbitrary settings. More...
#include <runtime_settings_map.hpp>
Public Types | |
using | mutex_type = detail::shared_spinlock |
using | generic_pointer = void * |
using | generic_function_pointer = void(*)() |
using | mapped_type = variant< none_t, int64_t, uint64_t, atom_value, generic_pointer, generic_function_pointer > |
Public Member Functions | |
mapped_type | get (atom_value key) const |
Returns the value mapped to key . | |
mapped_type | get_or (atom_value key, mapped_type fallback) const |
Returns the value mapped to key or fallback if no value is mapped to this key. More... | |
void | set (atom_value key, mapped_type value) |
Maps key to value and returns the previous value. | |
void | erase (atom_value key) |
Removes key from the map. | |
size_t | size () const |
Returns the number of key-value entries. | |
bool | empty () const |
Returns whether size() equals 0. | |
Thread-safe container for mapping atoms to arbitrary settings.
mapped_type caf::runtime_settings_map::get_or | ( | atom_value | key, |
mapped_type | fallback | ||
) | const |
Returns the value mapped to key
or fallback
if no value is mapped to this key.