|
| RcuMap (const RcuMap &)=delete |
|
| RcuMap (RcuMap &&)=delete |
|
RcuMap & | operator= (const RcuMap &)=delete |
|
RcuMap & | operator= (RcuMap &&)=delete |
|
size_t | SizeApprox () const |
| Returns an estimated size of the map at some point in time.
|
|
const ConstValuePtr | operator[] (const Key &) const |
| Returns a readonly value pointer by its key if exists.
|
|
const ValuePtr | operator[] (const Key &) |
| Returns a modifiable value pointer by key if exists or default-creates one.
|
|
InsertReturnType | Insert (const Key &key, ValuePtr value) |
| Inserts a new element into the container if there is no element with the key in the container. Returns a pair consisting of a pointer to the inserted element, or the already-existing element if no insertion happened, and a bool denoting whether the insertion took place.
|
|
template<typename... Args> |
InsertReturnType | Emplace (const Key &key, Args &&... args) |
| Inserts a new element into the container constructed in-place with the given args if there is no element with the key in the container. Returns a pair consisting of a pointer to the inserted element, or the already-existing element if no insertion happened, and a bool denoting whether the insertion took place.
|
|
template<typename... Args> |
InsertReturnType | TryEmplace (const Key &key, Args &&... args) |
| If a key equivalent to key already exists in the container, does nothing. Otherwise, behaves like Emplace except that the element is constructed as std::make_shared<Value>(std::piecewise_construct, std::forward_as_tuple(key), std::forward_as_tuple(std::forward<Args>(args)...)) . Returns a pair consisting of a pointer to the inserted element, or the already-existing element if no insertion happened, and a bool denoting whether the insertion took place.
|
|
template<typename RawKey > |
void | InsertOrAssign (RawKey &&key, ValuePtr value) |
| If a key equivalent to key already exists in the container, replaces the associated value. Otherwise, inserts a new pair into the map.
|
|
const ConstValuePtr | Get (const Key &) const |
| Returns a readonly value pointer by its key or an empty pointer.
|
|
const ValuePtr | Get (const Key &) |
| Returns a modifiable value pointer by key or an empty pointer.
|
|
bool | Erase (const Key &) |
| Removes a key from the map.
|
|
ValuePtr | Pop (const Key &) |
| Removes a key from the map returning its value.
|
|
void | Clear () |
| Resets the map to an empty state.
|
|
void | Assign (RawMap new_map) |
| Replace current data by data from new_map .
|
|
rcu::WritablePtr< RawMap, RcuTraits > | StartWrite () |
| Starts a transaction, used to perform a series of arbitrary changes to the map.
|
|
Snapshot | GetSnapshot () const |
| Returns a readonly copy of the map.
|
|
template<typename... Args> |
RcuMap< K, V, RcuMapTraits >::InsertReturnType | Emplace (const K &key, Args &&... args) |
|
template<typename... Args> |
RcuMap< K, V, RcuMapTraits >::InsertReturnType | TryEmplace (const K &key, Args &&... args) |
|
|
Keyset is fixed at the start of the iteration and is not affected by concurrent changes.
|
ConstIterator | begin () const |
|
ConstIterator | end () const |
|
Iterator | begin () |
|
Iterator | end () |
|