|
mCRL2
|
A unordered_map class in which aterms can be stored. More...
#include <unordered_map.h>
Public Types | |
| using | key_type = typename super::key_type |
| Standard typedefs. | |
| using | mapped_type = typename super::mapped_type |
| using | allocator_type = typename super::allocator_type |
| using | value_type = typename super::value_type |
| using | size_type = typename super::size_type |
| using | node_type = typename super::node_type |
| using | reference = typename super::reference |
| using | const_reference = typename super::const_reference |
| using | iterator = typename super::iterator |
| using | const_iterator = typename super::const_iterator |
| using | insert_return_type = typename super::insert_return_type |
| using | hasher = typename super::hasher |
| using | key_equal = typename super::key_equal |
Public Member Functions | |
| unordered_map () | |
| Default constructor. | |
| unordered_map (const allocator_type &alloc) | |
| Constructor. | |
| unordered_map (size_type n, const allocator_type &alloc=allocator_type()) | |
| Constructor. | |
| template<class InputIterator > | |
| unordered_map (InputIterator first, InputIterator last, const allocator_type &alloc=allocator_type()) | |
| Constructor. | |
| unordered_map (const unordered_map &x) | |
| Constructor. | |
| unordered_map (const unordered_map &x, const allocator_type &alloc) | |
| Constructor. | |
| unordered_map (unordered_map &&x) noexcept | |
| Constructor. | |
| unordered_map (unordered_map &&x, const allocator_type &alloc) | |
| Constructor. | |
| unordered_map (std::initializer_list< value_type > il, const allocator_type &alloc=allocator_type()) | |
| Constructor. | |
| unordered_map & | operator= (const unordered_map &other) |
| Standard assignment. | |
| unordered_map & | operator= (unordered_map &&other) noexcept |
| Standard move assignment. | |
| ~unordered_map ()=default | |
| Standard destructor. | |
| allocator_type | get_allocator () const noexcept |
| void | clear () noexcept |
| std::pair< iterator, bool > | insert (const value_type &value) |
| Inserts an element referring to a default value in the map. | |
| template<class P > requires std::constructible_from<typename std::unordered_map<detail::markable_aterm<Key>, detail::markable_aterm<T>, Hash, Pred, Alloc>::value_type, P> | |
| std::pair< iterator, bool > | insert (P &&value) |
| iterator | insert (const_iterator hint, const value_type &value) |
| template<class P > requires std::constructible_from<typename std::unordered_map<detail::markable_aterm<Key>, detail::markable_aterm<T>, Hash, Pred, Alloc>::value_type, P> | |
| iterator | insert (const_iterator hint, P &&value) |
| template<class InputIt > | |
| void | insert (InputIt first, InputIt last) |
| void | insert (std::initializer_list< value_type > ilist) |
| insert_return_type | insert (node_type &&nh) |
| iterator | insert (const_iterator hint, node_type &&nh) |
| template<class M > | |
| std::pair< iterator, bool > | insert_or_assign (const Key &k, M &&obj) |
| template<class M > | |
| std::pair< iterator, bool > | insert_or_assign (Key &&k, M &&obj) |
| template<class M > | |
| iterator | insert_or_assign (const_iterator hint, const Key &k, M &&obj) |
| template<class M > | |
| iterator | insert_or_assign (const_iterator hint, Key &&k, M &&obj) |
| template<class... Args> | |
| std::pair< iterator, bool > | emplace (Args &&... args) |
| template<class... Args> | |
| iterator | emplace_hint (const_iterator hint, Args &&... args) |
| template<class... Args> | |
| std::pair< iterator, bool > | try_emplace (const Key &k, Args &&... args) |
| template<class... Args> | |
| std::pair< iterator, bool > | try_emplace (Key &&k, Args &&... args) |
| template<class... Args> | |
| iterator | try_emplace (const_iterator hint, const Key &k, Args &&... args) |
| template<class... Args> | |
| iterator | try_emplace (const_iterator hint, Key &&k, Args &&... args) |
| iterator | erase (iterator pos) |
| iterator | erase (const_iterator pos) |
| iterator | erase (const_iterator first, const_iterator last) |
| size_type | erase (const Key &key) |
| void | swap (unordered_map &other) noexcept |
| node_type | extract (const_iterator position) |
| node_type | extract (const Key &k) |
| mapped_type & | operator[] (const Key &key) |
| Provides access to the value associated with the given key, inserting a default value when the key is not yet present. | |
| mapped_type & | at (const Key &key) |
| Provides access to the value associated with the given key. | |
| const mapped_type & | at (const Key &key) const |
| iterator | find (const Key &key) |
| const_iterator | find (const Key &key) const |
| size_type | count (const Key &key) const |
| bool | contains (const Key &key) const |
| std::size_t | size () const |
| iterator | begin () |
| iterator | end () |
| const_iterator | begin () const |
| const_iterator | end () const |
| const_iterator | cbegin () const |
| const_iterator | cend () const |
| bool | empty () const noexcept |
| size_type | max_size () const noexcept |
| void | rehash (size_type count) |
| void | reserve (size_type count) |
| hasher | hash_function () const |
| key_equal | key_eq () const |
| void | mark (term_mark_stack &todo) const |
| Marks all stored terms during garbage collection; used when this container is an element of another protected container. | |
| bool | operator== (const unordered_map &other) const |
| template<class P > requires std::constructible_from<typename std::unordered_map<detail::markable_aterm<Key>, detail::markable_aterm<T>, Hash, Pred, Alloc>::value_type, P> | |
| std::pair< typename unordered_map< Key, T, Hash, Pred, Alloc >::iterator, bool > | insert (P &&value) |
| template<class P > requires std::constructible_from<typename std::unordered_map<detail::markable_aterm<Key>, detail::markable_aterm<T>, Hash, Pred, Alloc>::value_type, P> | |
| unordered_map< Key, T, Hash, Pred, Alloc >::iterator | insert (const_iterator hint, P &&value) |
| template<class InputIt > | |
| void | insert (InputIt first, InputIt last) |
| template<class P > | |
| std::pair< typename unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::iterator, bool > | insert (P &&value) |
Protected Types | |
| using | super = std::unordered_map< detail::markable_aterm< Key >, detail::markable_aterm< T >, Hash, Pred, Alloc > |
Protected Attributes | |
| super | m_container |
| detail::generic_aterm_container< super > | container_wrapper |
A unordered_map class in which aterms can be stored.
The API of a std::unordered_map is exposed by explicit forwarding (composition) instead of inheritance, such that every operation is guaranteed to acquire the shared lock that keeps the garbage collector out of the container while it is used.
Definition at line 41 of file unordered_map.h.
| using atermpp::unordered_map< Key, T, Hash, Pred, Alloc >::allocator_type = typename super::allocator_type |
Definition at line 54 of file unordered_map.h.
| using atermpp::unordered_map< Key, T, Hash, Pred, Alloc >::const_iterator = typename super::const_iterator |
Definition at line 61 of file unordered_map.h.
| using atermpp::unordered_map< Key, T, Hash, Pred, Alloc >::const_reference = typename super::const_reference |
Definition at line 59 of file unordered_map.h.
| using atermpp::unordered_map< Key, T, Hash, Pred, Alloc >::hasher = typename super::hasher |
Definition at line 63 of file unordered_map.h.
| using atermpp::unordered_map< Key, T, Hash, Pred, Alloc >::insert_return_type = typename super::insert_return_type |
Definition at line 62 of file unordered_map.h.
| using atermpp::unordered_map< Key, T, Hash, Pred, Alloc >::iterator = typename super::iterator |
Definition at line 60 of file unordered_map.h.
| using atermpp::unordered_map< Key, T, Hash, Pred, Alloc >::key_equal = typename super::key_equal |
Definition at line 64 of file unordered_map.h.
| using atermpp::unordered_map< Key, T, Hash, Pred, Alloc >::key_type = typename super::key_type |
Standard typedefs.
Definition at line 52 of file unordered_map.h.
| using atermpp::unordered_map< Key, T, Hash, Pred, Alloc >::mapped_type = typename super::mapped_type |
Definition at line 53 of file unordered_map.h.
| using atermpp::unordered_map< Key, T, Hash, Pred, Alloc >::node_type = typename super::node_type |
Definition at line 57 of file unordered_map.h.
| using atermpp::unordered_map< Key, T, Hash, Pred, Alloc >::reference = typename super::reference |
Definition at line 58 of file unordered_map.h.
| using atermpp::unordered_map< Key, T, Hash, Pred, Alloc >::size_type = typename super::size_type |
Definition at line 56 of file unordered_map.h.
|
protected |
Definition at line 44 of file unordered_map.h.
| using atermpp::unordered_map< Key, T, Hash, Pred, Alloc >::value_type = typename super::value_type |
Definition at line 55 of file unordered_map.h.
|
inline |
Default constructor.
Definition at line 67 of file unordered_map.h.
|
inlineexplicit |
Constructor.
Definition at line 73 of file unordered_map.h.
|
inlineexplicit |
Constructor.
Definition at line 79 of file unordered_map.h.
|
inline |
Constructor.
Definition at line 86 of file unordered_map.h.
|
inline |
Constructor.
Definition at line 92 of file unordered_map.h.
|
inline |
Constructor.
Definition at line 98 of file unordered_map.h.
|
inlinenoexcept |
Constructor.
Definition at line 104 of file unordered_map.h.
|
inline |
Constructor.
Definition at line 111 of file unordered_map.h.
|
inline |
Constructor.
Definition at line 117 of file unordered_map.h.
|
default |
Standard destructor.
| unordered_map< Key, T, Hash, Pred, Alloc >::mapped_type & atermpp::unordered_map< Key, T, Hash, Pred, Alloc >::at | ( | const Key & | key | ) |
Provides access to the value associated with the given key.
Definition at line 253 of file unordered_map_implementation.h.
| const mapped_type & atermpp::unordered_map< Key, T, Hash, Pred, Alloc >::at | ( | const Key & | key | ) | const |
|
inline |
| const_iterator atermpp::unordered_map< Key, T, Hash, Pred, Alloc >::begin | ( | ) | const |
| const_iterator atermpp::unordered_map< Key, T, Hash, Pred, Alloc >::cbegin | ( | ) | const |
| const_iterator atermpp::unordered_map< Key, T, Hash, Pred, Alloc >::cend | ( | ) | const |
|
noexcept |
| bool atermpp::unordered_map< Key, T, Hash, Pred, Alloc >::contains | ( | const Key & | key | ) | const |
Definition at line 288 of file unordered_map_implementation.h.
| size_type atermpp::unordered_map< Key, T, Hash, Pred, Alloc >::count | ( | const Key & | key | ) | const |
| std::pair< iterator, bool > atermpp::unordered_map< Key, T, Hash, Pred, Alloc >::emplace | ( | Args &&... | args | ) |
| iterator atermpp::unordered_map< Key, T, Hash, Pred, Alloc >::emplace_hint | ( | const_iterator | hint, |
| Args &&... | args | ||
| ) |
|
noexcept |
|
inline |
| const_iterator atermpp::unordered_map< Key, T, Hash, Pred, Alloc >::end | ( | ) | const |
| size_type atermpp::unordered_map< Key, T, Hash, Pred, Alloc >::erase | ( | const Key & | key | ) |
| iterator atermpp::unordered_map< Key, T, Hash, Pred, Alloc >::erase | ( | const_iterator | first, |
| const_iterator | last | ||
| ) |
| iterator atermpp::unordered_map< Key, T, Hash, Pred, Alloc >::erase | ( | const_iterator | pos | ) |
| iterator atermpp::unordered_map< Key, T, Hash, Pred, Alloc >::erase | ( | iterator | pos | ) |
| unordered_map< Key, T, Hash, Pred, Alloc >::node_type atermpp::unordered_map< Key, T, Hash, Pred, Alloc >::extract | ( | const Key & | k | ) |
Definition at line 238 of file unordered_map_implementation.h.
| unordered_map< Key, T, Hash, Pred, Alloc >::node_type atermpp::unordered_map< Key, T, Hash, Pred, Alloc >::extract | ( | const_iterator | position | ) |
Definition at line 231 of file unordered_map_implementation.h.
| unordered_map< Key, T, Hash, Pred, Alloc >::iterator atermpp::unordered_map< Key, T, Hash, Pred, Alloc >::find | ( | const Key & | key | ) |
Definition at line 267 of file unordered_map_implementation.h.
| unordered_map< Key, T, Hash, Pred, Alloc >::const_iterator atermpp::unordered_map< Key, T, Hash, Pred, Alloc >::find | ( | const Key & | key | ) | const |
Definition at line 274 of file unordered_map_implementation.h.
|
inlinenoexcept |
Definition at line 132 of file unordered_map.h.
|
inline |
Definition at line 255 of file unordered_map.h.
| std::pair< iterator, bool > atermpp::unordered_map< Key, T, Hash, Pred, Alloc >::insert | ( | const value_type & | value | ) |
Inserts an element referring to a default value in the map.
| iterator atermpp::unordered_map< Key, T, Hash, Pred, Alloc >::insert | ( | const_iterator | hint, |
| const value_type & | value | ||
| ) |
| unordered_map< Key, T, Hash, Pred, Alloc >::iterator atermpp::unordered_map< Key, T, Hash, Pred, Alloc >::insert | ( | const_iterator | hint, |
| node_type && | nh | ||
| ) |
Definition at line 109 of file unordered_map_implementation.h.
| unordered_map< Key, T, Hash, Pred, Alloc >::iterator atermpp::unordered_map< Key, T, Hash, Pred, Alloc >::insert | ( | const_iterator | hint, |
| P && | value | ||
| ) |
Definition at line 80 of file unordered_map_implementation.h.
| iterator atermpp::unordered_map< Key, T, Hash, Pred, Alloc >::insert | ( | const_iterator | hint, |
| P && | value | ||
| ) |
| void atermpp::unordered_map< Key, T, Hash, Pred, Alloc >::insert | ( | InputIt | first, |
| InputIt | last | ||
| ) |
Definition at line 88 of file unordered_map_implementation.h.
| void atermpp::unordered_map< Key, T, Hash, Pred, Alloc >::insert | ( | InputIt | first, |
| InputIt | last | ||
| ) |
| unordered_map< Key, T, Hash, Pred, Alloc >::insert_return_type atermpp::unordered_map< Key, T, Hash, Pred, Alloc >::insert | ( | node_type && | nh | ) |
Definition at line 102 of file unordered_map_implementation.h.
| std::pair< typename unordered_map< Key, T, Hash, Pred, Alloc >::iterator, bool > atermpp::unordered_map< Key, T, Hash, Pred, Alloc >::insert | ( | P && | value | ) |
Definition at line 64 of file unordered_map_implementation.h.
| std::pair< typename unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::iterator, bool > atermpp::unordered_map< Key, T, Hash, Pred, Alloc >::insert | ( | P && | value | ) |
Definition at line 505 of file unordered_map_implementation.h.
| std::pair< iterator, bool > atermpp::unordered_map< Key, T, Hash, Pred, Alloc >::insert | ( | P && | value | ) |
| void atermpp::unordered_map< Key, T, Hash, Pred, Alloc >::insert | ( | std::initializer_list< value_type > | ilist | ) |
| std::pair< iterator, bool > atermpp::unordered_map< Key, T, Hash, Pred, Alloc >::insert_or_assign | ( | const Key & | k, |
| M && | obj | ||
| ) |
| iterator atermpp::unordered_map< Key, T, Hash, Pred, Alloc >::insert_or_assign | ( | const_iterator | hint, |
| const Key & | k, | ||
| M && | obj | ||
| ) |
| iterator atermpp::unordered_map< Key, T, Hash, Pred, Alloc >::insert_or_assign | ( | const_iterator | hint, |
| Key && | k, | ||
| M && | obj | ||
| ) |
| std::pair< iterator, bool > atermpp::unordered_map< Key, T, Hash, Pred, Alloc >::insert_or_assign | ( | Key && | k, |
| M && | obj | ||
| ) |
|
inline |
Definition at line 256 of file unordered_map.h.
|
inline |
Marks all stored terms during garbage collection; used when this container is an element of another protected container.
Definition at line 260 of file unordered_map.h.
|
noexcept |
| unordered_map & atermpp::unordered_map< Key, T, Hash, Pred, Alloc >::operator= | ( | const unordered_map< Key, T, Hash, Pred, Alloc > & | other | ) |
Standard assignment.
|
noexcept |
Standard move assignment.
|
inline |
Definition at line 269 of file unordered_map.h.
| mapped_type & atermpp::unordered_map< Key, T, Hash, Pred, Alloc >::operator[] | ( | const Key & | key | ) |
Provides access to the value associated with the given key, inserting a default value when the key is not yet present.
| void atermpp::unordered_map< Key, T, Hash, Pred, Alloc >::rehash | ( | size_type | count | ) |
| void atermpp::unordered_map< Key, T, Hash, Pred, Alloc >::reserve | ( | size_type | count | ) |
|
inline |
Definition at line 223 of file unordered_map.h.
|
noexcept |
| std::pair< iterator, bool > atermpp::unordered_map< Key, T, Hash, Pred, Alloc >::try_emplace | ( | const Key & | k, |
| Args &&... | args | ||
| ) |
| iterator atermpp::unordered_map< Key, T, Hash, Pred, Alloc >::try_emplace | ( | const_iterator | hint, |
| const Key & | k, | ||
| Args &&... | args | ||
| ) |
| iterator atermpp::unordered_map< Key, T, Hash, Pred, Alloc >::try_emplace | ( | const_iterator | hint, |
| Key && | k, | ||
| Args &&... | args | ||
| ) |
| std::pair< iterator, bool > atermpp::unordered_map< Key, T, Hash, Pred, Alloc >::try_emplace | ( | Key && | k, |
| Args &&... | args | ||
| ) |
|
protected |
Definition at line 47 of file unordered_map.h.
|
protected |
Definition at line 46 of file unordered_map.h.