CAF  0.17.2
Public Types | Public Member Functions | List of all members
caf::runtime_settings_map Class Reference

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.
 
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.
 

Detailed Description

Thread-safe container for mapping atoms to arbitrary settings.


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