mCRL2
Loading...
Searching...
No Matches
atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe > Class Template Reference

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 reference = typename super::reference
 
using const_reference = typename super::const_reference
 
using iterator = typename super::iterator
 
using const_iterator = typename super::const_iterator
 

Public Member Functions

 unordered_map ()
 Default constructor.
 
 unordered_map (size_type n)
 Constructor.
 
 unordered_map (const unordered_map &x)
 Constructor.
 
 unordered_map (unordered_map &&x) noexcept
 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.
 
void clear () noexcept
 
template<typename ... Args>
iterator find (const Args &... args)
 Standard find function in a map.
 
template<typename ... Args>
const_iterator find (const Args &... args) const
 Standard find function in a map.
 
std::pair< iterator, bool > insert (const value_type &value)
 
template<class P >
std::pair< iterator, bool > insert (P &&value)
 
iterator insert (const_iterator hint, value_type &&value)
 
template<class 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)
 
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
 
mapped_type & operator[] (const key_type &key)
 Provides access to the value associated with the given key, inserting a default value when the key is not yet present.
 
const mapped_type & at (const key_type &key) const
 Provides access to the value associated with the given key.
 
size_type count (const key_type &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 mark (term_mark_stack &todo) const
 Marks all stored terms during garbage collection; used when this container is an element of another protected container.
 

Protected Types

using super = mcrl2::utilities::unordered_map< detail::markable_aterm< Key >, detail::markable_aterm< T >, Hash, Pred, Alloc, ThreadSafe, false >
 

Protected Member Functions

void rehash (std::size_t new_size)
 
void rehash_if_needed ()
 Rehashes the container when the load factor is exceeded, re-checking the load factor under the exclusive lock when ThreadSafe to avoid redundant rehashes.
 
bool rehash_is_needed () const
 

Protected Attributes

super m_container
 
detail::generic_aterm_container< super > container_wrapper
 

Detailed Description

template<class Key, class T, class Hash = std::hash<detail::markable_aterm<Key> >, class Pred = std::equal_to<detail::markable_aterm<Key> >, class Alloc = std::allocator< std::pair<const detail::markable_aterm<Key>, detail::markable_aterm<T> > >, bool ThreadSafe = false>
class atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >

A unordered_map class in which aterms can be stored.

The API of a mcrl2::utilities::unordered_map is exposed by explicit forwarding (composition) instead of inheritance, such that every operation is guaranteed to acquire the necessary locks.

Definition at line 285 of file unordered_map.h.

Member Typedef Documentation

◆ allocator_type

template<class Key , class T , class Hash = std::hash<detail::markable_aterm<Key> >, class Pred = std::equal_to<detail::markable_aterm<Key> >, class Alloc = std::allocator< std::pair<const detail::markable_aterm<Key>, detail::markable_aterm<T> > >, bool ThreadSafe = false>
using atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::allocator_type = typename super::allocator_type

Definition at line 299 of file unordered_map.h.

◆ const_iterator

template<class Key , class T , class Hash = std::hash<detail::markable_aterm<Key> >, class Pred = std::equal_to<detail::markable_aterm<Key> >, class Alloc = std::allocator< std::pair<const detail::markable_aterm<Key>, detail::markable_aterm<T> > >, bool ThreadSafe = false>
using atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::const_iterator = typename super::const_iterator

Definition at line 305 of file unordered_map.h.

◆ const_reference

template<class Key , class T , class Hash = std::hash<detail::markable_aterm<Key> >, class Pred = std::equal_to<detail::markable_aterm<Key> >, class Alloc = std::allocator< std::pair<const detail::markable_aterm<Key>, detail::markable_aterm<T> > >, bool ThreadSafe = false>
using atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::const_reference = typename super::const_reference

Definition at line 303 of file unordered_map.h.

◆ iterator

template<class Key , class T , class Hash = std::hash<detail::markable_aterm<Key> >, class Pred = std::equal_to<detail::markable_aterm<Key> >, class Alloc = std::allocator< std::pair<const detail::markable_aterm<Key>, detail::markable_aterm<T> > >, bool ThreadSafe = false>
using atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::iterator = typename super::iterator

Definition at line 304 of file unordered_map.h.

◆ key_type

template<class Key , class T , class Hash = std::hash<detail::markable_aterm<Key> >, class Pred = std::equal_to<detail::markable_aterm<Key> >, class Alloc = std::allocator< std::pair<const detail::markable_aterm<Key>, detail::markable_aterm<T> > >, bool ThreadSafe = false>
using atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::key_type = typename super::key_type

Standard typedefs.

Definition at line 297 of file unordered_map.h.

◆ mapped_type

template<class Key , class T , class Hash = std::hash<detail::markable_aterm<Key> >, class Pred = std::equal_to<detail::markable_aterm<Key> >, class Alloc = std::allocator< std::pair<const detail::markable_aterm<Key>, detail::markable_aterm<T> > >, bool ThreadSafe = false>
using atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::mapped_type = typename super::mapped_type

Definition at line 298 of file unordered_map.h.

◆ reference

template<class Key , class T , class Hash = std::hash<detail::markable_aterm<Key> >, class Pred = std::equal_to<detail::markable_aterm<Key> >, class Alloc = std::allocator< std::pair<const detail::markable_aterm<Key>, detail::markable_aterm<T> > >, bool ThreadSafe = false>
using atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::reference = typename super::reference

Definition at line 302 of file unordered_map.h.

◆ size_type

template<class Key , class T , class Hash = std::hash<detail::markable_aterm<Key> >, class Pred = std::equal_to<detail::markable_aterm<Key> >, class Alloc = std::allocator< std::pair<const detail::markable_aterm<Key>, detail::markable_aterm<T> > >, bool ThreadSafe = false>
using atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::size_type = typename super::size_type

Definition at line 301 of file unordered_map.h.

◆ super

template<class Key , class T , class Hash = std::hash<detail::markable_aterm<Key> >, class Pred = std::equal_to<detail::markable_aterm<Key> >, class Alloc = std::allocator< std::pair<const detail::markable_aterm<Key>, detail::markable_aterm<T> > >, bool ThreadSafe = false>
using atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::super = mcrl2::utilities:: unordered_map<detail::markable_aterm<Key>, detail::markable_aterm<T>, Hash, Pred, Alloc, ThreadSafe, false>
protected

Definition at line 288 of file unordered_map.h.

◆ value_type

template<class Key , class T , class Hash = std::hash<detail::markable_aterm<Key> >, class Pred = std::equal_to<detail::markable_aterm<Key> >, class Alloc = std::allocator< std::pair<const detail::markable_aterm<Key>, detail::markable_aterm<T> > >, bool ThreadSafe = false>
using atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::value_type = typename super::value_type

Definition at line 300 of file unordered_map.h.

Constructor & Destructor Documentation

◆ unordered_map() [1/4]

template<class Key , class T , class Hash = std::hash<detail::markable_aterm<Key> >, class Pred = std::equal_to<detail::markable_aterm<Key> >, class Alloc = std::allocator< std::pair<const detail::markable_aterm<Key>, detail::markable_aterm<T> > >, bool ThreadSafe = false>
atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::unordered_map ( )
inline

Default constructor.

Definition at line 308 of file unordered_map.h.

◆ unordered_map() [2/4]

template<class Key , class T , class Hash = std::hash<detail::markable_aterm<Key> >, class Pred = std::equal_to<detail::markable_aterm<Key> >, class Alloc = std::allocator< std::pair<const detail::markable_aterm<Key>, detail::markable_aterm<T> > >, bool ThreadSafe = false>
atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::unordered_map ( size_type  n)
inlineexplicit

Constructor.

Definition at line 314 of file unordered_map.h.

◆ unordered_map() [3/4]

template<class Key , class T , class Hash = std::hash<detail::markable_aterm<Key> >, class Pred = std::equal_to<detail::markable_aterm<Key> >, class Alloc = std::allocator< std::pair<const detail::markable_aterm<Key>, detail::markable_aterm<T> > >, bool ThreadSafe = false>
atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::unordered_map ( const unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe > &  x)
inline

Constructor.

Definition at line 320 of file unordered_map.h.

◆ unordered_map() [4/4]

template<class Key , class T , class Hash = std::hash<detail::markable_aterm<Key> >, class Pred = std::equal_to<detail::markable_aterm<Key> >, class Alloc = std::allocator< std::pair<const detail::markable_aterm<Key>, detail::markable_aterm<T> > >, bool ThreadSafe = false>
atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::unordered_map ( unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe > &&  x)
inlinenoexcept

Constructor.

Definition at line 326 of file unordered_map.h.

◆ ~unordered_map()

template<class Key , class T , class Hash = std::hash<detail::markable_aterm<Key> >, class Pred = std::equal_to<detail::markable_aterm<Key> >, class Alloc = std::allocator< std::pair<const detail::markable_aterm<Key>, detail::markable_aterm<T> > >, bool ThreadSafe = false>
atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::~unordered_map ( )
default

Standard destructor.

Member Function Documentation

◆ at()

template<class Key , class T , class Hash , class Pred , class Alloc , bool ThreadSafe>
const unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::mapped_type & atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::at ( const key_type &  key) const

Provides access to the value associated with the given key.

Definition at line 481 of file unordered_map_implementation.h.

◆ begin() [1/2]

template<class Key , class T , class Hash , class Pred , class Alloc , bool ThreadSafe>
unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::iterator atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::begin
Returns
An iterator over all keys.

Definition at line 682 of file unordered_map_implementation.h.

◆ begin() [2/2]

template<class Key , class T , class Hash , class Pred , class Alloc , bool ThreadSafe>
unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::const_iterator atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::begin
Returns
A const iterator over all keys.

Definition at line 696 of file unordered_map_implementation.h.

◆ cbegin()

template<class Key , class T , class Hash , class Pred , class Alloc , bool ThreadSafe>
unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::const_iterator atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::cbegin
Returns
A const iterator over all keys.

Definition at line 710 of file unordered_map_implementation.h.

◆ cend()

template<class Key , class T , class Hash , class Pred , class Alloc , bool ThreadSafe>
unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::const_iterator atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::cend

Definition at line 717 of file unordered_map_implementation.h.

◆ clear()

template<class Key , class T , class Hash , class Pred , class Alloc , bool ThreadSafe>
void atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::clear
noexcept

Definition at line 439 of file unordered_map_implementation.h.

◆ count()

template<class Key , class T , class Hash , class Pred , class Alloc , bool ThreadSafe>
unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::size_type atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::count ( const key_type &  key) const
Returns
The number of elements matching the specified key.

Definition at line 489 of file unordered_map_implementation.h.

◆ emplace()

template<class Key , class T , class Hash = std::hash<detail::markable_aterm<Key> >, class Pred = std::equal_to<detail::markable_aterm<Key> >, class Alloc = std::allocator< std::pair<const detail::markable_aterm<Key>, detail::markable_aterm<T> > >, bool ThreadSafe = false>
template<class... Args>
std::pair< iterator, bool > atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::emplace ( Args &&...  args)

◆ emplace_hint()

template<class Key , class T , class Hash , class Pred , class Alloc , bool ThreadSafe>
template<class... Args>
unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::iterator atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::emplace_hint ( const_iterator  hint,
Args &&...  args 
)

Definition at line 594 of file unordered_map_implementation.h.

◆ empty()

template<class Key , class T , class Hash , class Pred , class Alloc , bool ThreadSafe>
bool atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::empty
noexcept
Returns
True iff the set is empty.

Definition at line 724 of file unordered_map_implementation.h.

◆ end() [1/2]

template<class Key , class T , class Hash , class Pred , class Alloc , bool ThreadSafe>
unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::iterator atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::end

Definition at line 689 of file unordered_map_implementation.h.

◆ end() [2/2]

template<class Key , class T , class Hash , class Pred , class Alloc , bool ThreadSafe>
unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::const_iterator atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::end

Definition at line 703 of file unordered_map_implementation.h.

◆ erase() [1/4]

template<class Key , class T , class Hash , class Pred , class Alloc , bool ThreadSafe>
unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::size_type atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::erase ( const Key &  key)

Definition at line 659 of file unordered_map_implementation.h.

◆ erase() [2/4]

template<class Key , class T , class Hash , class Pred , class Alloc , bool ThreadSafe>
unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::iterator atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::erase ( const_iterator  first,
const_iterator  last 
)

Definition at line 210 of file unordered_map_implementation.h.

◆ erase() [3/4]

template<class Key , class T , class Hash , class Pred , class Alloc , bool ThreadSafe>
unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::iterator atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::erase ( const_iterator  pos)

Definition at line 645 of file unordered_map_implementation.h.

◆ erase() [4/4]

template<class Key , class T , class Hash , class Pred , class Alloc , bool ThreadSafe>
unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::iterator atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::erase ( iterator  pos)

Definition at line 196 of file unordered_map_implementation.h.

◆ find() [1/2]

template<class Key , class T , class Hash , class Pred , class Alloc , bool ThreadSafe>
template<typename ... Args>
unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::iterator atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::find ( const Args &...  args)

Standard find function in a map.

Returns
Element with the specified key.

Definition at line 447 of file unordered_map_implementation.h.

◆ find() [2/2]

template<class Key , class T , class Hash , class Pred , class Alloc , bool ThreadSafe>
template<typename ... Args>
unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::const_iterator atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::find ( const Args &...  args) const

Standard find function in a map.

Returns
Element with the specified key.

Definition at line 459 of file unordered_map_implementation.h.

◆ insert() [1/6]

template<class Key , class T , class Hash , class Pred , class Alloc , bool ThreadSafe>
std::pair< typename unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::iterator, bool > atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::insert ( const value_type &  value)

Definition at line 496 of file unordered_map_implementation.h.

◆ insert() [2/6]

template<class Key , class T , class Hash , class Pred , class Alloc , bool ThreadSafe>
template<class P >
unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::iterator atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::insert ( const_iterator  hint,
P &&  value 
)

Definition at line 522 of file unordered_map_implementation.h.

◆ insert() [3/6]

template<class Key , class T , class Hash , class Pred , class Alloc , bool ThreadSafe>
unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::iterator atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::insert ( const_iterator  hint,
value_type &&  value 
)

Definition at line 513 of file unordered_map_implementation.h.

◆ insert() [4/6]

template<class Key , class T , class Hash , class Pred , class Alloc , bool ThreadSafe>
template<class InputIt >
void atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::insert ( InputIt  first,
InputIt  last 
)

Definition at line 531 of file unordered_map_implementation.h.

◆ insert() [5/6]

template<class Key , class T , class Hash = std::hash<detail::markable_aterm<Key> >, class Pred = std::equal_to<detail::markable_aterm<Key> >, class Alloc = std::allocator< std::pair<const detail::markable_aterm<Key>, detail::markable_aterm<T> > >, bool ThreadSafe = false>
template<class P >
std::pair< iterator, bool > atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::insert ( P &&  value)

◆ insert() [6/6]

template<class Key , class T , class Hash , class Pred , class Alloc , bool ThreadSafe>
void atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::insert ( std::initializer_list< value_type >  ilist)

Definition at line 95 of file unordered_map_implementation.h.

◆ insert_or_assign() [1/4]

template<class Key , class T , class Hash = std::hash<detail::markable_aterm<Key> >, class Pred = std::equal_to<detail::markable_aterm<Key> >, class Alloc = std::allocator< std::pair<const detail::markable_aterm<Key>, detail::markable_aterm<T> > >, bool ThreadSafe = false>
template<class M >
std::pair< iterator, bool > atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::insert_or_assign ( const Key &  k,
M &&  obj 
)

◆ insert_or_assign() [2/4]

template<class Key , class T , class Hash , class Pred , class Alloc , bool ThreadSafe>
template<class M >
unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::iterator atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::insert_or_assign ( const_iterator  hint,
const Key &  k,
M &&  obj 
)

Definition at line 567 of file unordered_map_implementation.h.

◆ insert_or_assign() [3/4]

template<class Key , class T , class Hash , class Pred , class Alloc , bool ThreadSafe>
template<class M >
unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::iterator atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::insert_or_assign ( const_iterator  hint,
Key &&  k,
M &&  obj 
)

Definition at line 576 of file unordered_map_implementation.h.

◆ insert_or_assign() [4/4]

template<class Key , class T , class Hash = std::hash<detail::markable_aterm<Key> >, class Pred = std::equal_to<detail::markable_aterm<Key> >, class Alloc = std::allocator< std::pair<const detail::markable_aterm<Key>, detail::markable_aterm<T> > >, bool ThreadSafe = false>
template<class M >
std::pair< iterator, bool > atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::insert_or_assign ( Key &&  k,
M &&  obj 
)

◆ mark()

template<class Key , class T , class Hash = std::hash<detail::markable_aterm<Key> >, class Pred = std::equal_to<detail::markable_aterm<Key> >, class Alloc = std::allocator< std::pair<const detail::markable_aterm<Key>, detail::markable_aterm<T> > >, bool ThreadSafe = false>
void atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::mark ( term_mark_stack &  todo) const
inline

Marks all stored terms during garbage collection; used when this container is an element of another protected container.

Definition at line 450 of file unordered_map.h.

◆ max_size()

template<class Key , class T , class Hash , class Pred , class Alloc , bool ThreadSafe>
unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::size_type atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::max_size
noexcept
Returns
The amount of elements stored in this set.

Definition at line 731 of file unordered_map_implementation.h.

◆ operator=() [1/2]

template<class Key , class T , class Hash , class Pred , class Alloc , bool ThreadSafe>
unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe > & atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::operator= ( const unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe > &  other)

Standard assignment.

Definition at line 25 of file unordered_map_implementation.h.

◆ operator=() [2/2]

template<class Key , class T , class Hash , class Pred , class Alloc , bool ThreadSafe>
unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe > & atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::operator= ( unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe > &&  other)
noexcept

Standard move assignment.

Definition at line 36 of file unordered_map_implementation.h.

◆ operator[]()

template<class Key , class T , class Hash , class Pred , class Alloc , bool ThreadSafe>
unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::mapped_type & atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::operator[] ( const key_type &  key)

Provides access to the value associated with the given key, inserting a default value when the key is not yet present.

Definition at line 471 of file unordered_map_implementation.h.

◆ rehash()

template<class Key , class T , class Hash , class Pred , class Alloc , bool ThreadSafe>
void atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::rehash ( std::size_t  new_size)
inlineprotected

Definition at line 392 of file unordered_map_implementation.h.

◆ rehash_if_needed()

template<class Key , class T , class Hash , class Pred , class Alloc , bool ThreadSafe>
void atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::rehash_if_needed
inlineprotected

Rehashes the container when the load factor is exceeded, re-checking the load factor under the exclusive lock when ThreadSafe to avoid redundant rehashes.

Definition at line 414 of file unordered_map_implementation.h.

◆ rehash_is_needed()

template<class Key , class T , class Hash , class Pred , class Alloc , bool ThreadSafe>
bool atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::rehash_is_needed
inlineprotected

Definition at line 408 of file unordered_map_implementation.h.

◆ size()

template<class Key , class T , class Hash = std::hash<detail::markable_aterm<Key> >, class Pred = std::equal_to<detail::markable_aterm<Key> >, class Alloc = std::allocator< std::pair<const detail::markable_aterm<Key>, detail::markable_aterm<T> > >, bool ThreadSafe = false>
std::size_t atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::size ( ) const
inline

Definition at line 423 of file unordered_map.h.

◆ swap()

template<class Key , class T , class Hash , class Pred , class Alloc , bool ThreadSafe>
void atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::swap ( unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe > &  other)
noexcept

Definition at line 224 of file unordered_map_implementation.h.

◆ try_emplace() [1/4]

template<class Key , class T , class Hash = std::hash<detail::markable_aterm<Key> >, class Pred = std::equal_to<detail::markable_aterm<Key> >, class Alloc = std::allocator< std::pair<const detail::markable_aterm<Key>, detail::markable_aterm<T> > >, bool ThreadSafe = false>
template<class... Args>
std::pair< iterator, bool > atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::try_emplace ( const Key &  k,
Args &&...  args 
)

◆ try_emplace() [2/4]

template<class Key , class T , class Hash , class Pred , class Alloc , bool ThreadSafe>
template<class... Args>
unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::iterator atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::try_emplace ( const_iterator  hint,
const Key &  k,
Args &&...  args 
)

Definition at line 621 of file unordered_map_implementation.h.

◆ try_emplace() [3/4]

template<class Key , class T , class Hash , class Pred , class Alloc , bool ThreadSafe>
template<class... Args>
unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::iterator atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::try_emplace ( const_iterator  hint,
Key &&  k,
Args &&...  args 
)

Definition at line 630 of file unordered_map_implementation.h.

◆ try_emplace() [4/4]

template<class Key , class T , class Hash = std::hash<detail::markable_aterm<Key> >, class Pred = std::equal_to<detail::markable_aterm<Key> >, class Alloc = std::allocator< std::pair<const detail::markable_aterm<Key>, detail::markable_aterm<T> > >, bool ThreadSafe = false>
template<class... Args>
std::pair< iterator, bool > atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::try_emplace ( Key &&  k,
Args &&...  args 
)

Member Data Documentation

◆ container_wrapper

template<class Key , class T , class Hash = std::hash<detail::markable_aterm<Key> >, class Pred = std::equal_to<detail::markable_aterm<Key> >, class Alloc = std::allocator< std::pair<const detail::markable_aterm<Key>, detail::markable_aterm<T> > >, bool ThreadSafe = false>
detail::generic_aterm_container<super> atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::container_wrapper
protected

Definition at line 292 of file unordered_map.h.

◆ m_container

template<class Key , class T , class Hash = std::hash<detail::markable_aterm<Key> >, class Pred = std::equal_to<detail::markable_aterm<Key> >, class Alloc = std::allocator< std::pair<const detail::markable_aterm<Key>, detail::markable_aterm<T> > >, bool ThreadSafe = false>
super atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::m_container
protected

Definition at line 291 of file unordered_map.h.


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