openMSX
Public Types | Public Member Functions | List of all members
hash_map< Key, Value, Hasher, Equal > Class Template Reference

#include <hash_map.hh>

Inheritance diagram for hash_map< Key, Value, Hasher, Equal >:
Inheritance graph
[legend]
Collaboration diagram for hash_map< Key, Value, Hasher, Equal >:
Collaboration graph
[legend]

Public Types

using key_type = Key
 
using mapped_type = Value
 
using value_type = std::pair< Key, Value >
 
using iterator = typename BaseType::iterator
 
using const_iterator = typename BaseType::const_iterator
 
- Public Types inherited from hash_set< std::pair< Key, Value >, hash_set_impl::ExtractFirst, Hasher, Equal >
using value_type = std::pair< Key, Value >
 
using iterator = Iter< hash_set, std::pair< Key, Value > >
 
using const_iterator = Iter< const hash_set, const std::pair< Key, Value > >
 

Public Member Functions

 hash_map (unsigned initialSize=0, Hasher hasher_=Hasher(), Equal equal_=Equal())
 
 hash_map (std::initializer_list< std::pair< Key, Value >> list)
 
template<typename K >
Value & operator[] (K &&key)
 
template<typename K , typename V >
std::pair< iterator, bool > insert_or_assign (K &&key, V &&value)
 
template<typename K >
bool contains (const K &k) const
 
- Public Member Functions inherited from hash_set< std::pair< Key, Value >, hash_set_impl::ExtractFirst, Hasher, Equal >
 hash_set (unsigned initialSize=0, hash_set_impl::ExtractFirst extract_=hash_set_impl::ExtractFirst(), Hasher hasher_=Hasher(), Equal equal_=Equal())
 
 hash_set (const hash_set &source)
 
 hash_set (hash_set &&source) noexcept
 
 hash_set (std::initializer_list< std::pair< Key, Value > > args)
 
 ~hash_set ()
 
hash_setoperator= (const hash_set &source)
 
hash_setoperator= (hash_set &&source) noexcept
 
bool contains (const K &key) const
 
std::pair< iterator, bool > insert (V &&value)
 
std::pair< iterator, bool > insert_noCapacityCheck (V &&value)
 
iterator insert_noDuplicateCheck (V &&value)
 
iterator insert_noCapacityCheck_noDuplicateCheck (V &&value)
 
std::pair< iterator, bool > emplace (Args &&... args)
 
std::pair< iterator, bool > emplace_noCapacityCheck (Args &&... args)
 
iterator emplace_noDuplicateCheck (Args &&... args)
 
iterator emplace_noCapacityCheck_noDuplicateCheck (Args &&... args)
 
bool erase (const K &key)
 
void erase (iterator it)
 
bool empty () const
 
unsigned size () const
 
void clear ()
 
iterator find (const K &key)
 
const_iterator find (const K &key) const
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
unsigned capacity () const
 
void reserve (unsigned count)
 

Detailed Description

template<typename Key, typename Value, typename Hasher = std::hash<Key>, typename Equal = EqualTo>
class hash_map< Key, Value, Hasher, Equal >

Definition at line 31 of file hash_map.hh.

Member Typedef Documentation

◆ const_iterator

template<typename Key, typename Value, typename Hasher = std::hash<Key>, typename Equal = EqualTo>
using hash_map< Key, Value, Hasher, Equal >::const_iterator = typename BaseType::const_iterator

Definition at line 39 of file hash_map.hh.

◆ iterator

template<typename Key, typename Value, typename Hasher = std::hash<Key>, typename Equal = EqualTo>
using hash_map< Key, Value, Hasher, Equal >::iterator = typename BaseType:: iterator

Definition at line 38 of file hash_map.hh.

◆ key_type

template<typename Key, typename Value, typename Hasher = std::hash<Key>, typename Equal = EqualTo>
using hash_map< Key, Value, Hasher, Equal >::key_type = Key

Definition at line 35 of file hash_map.hh.

◆ mapped_type

template<typename Key, typename Value, typename Hasher = std::hash<Key>, typename Equal = EqualTo>
using hash_map< Key, Value, Hasher, Equal >::mapped_type = Value

Definition at line 36 of file hash_map.hh.

◆ value_type

template<typename Key, typename Value, typename Hasher = std::hash<Key>, typename Equal = EqualTo>
using hash_map< Key, Value, Hasher, Equal >::value_type = std::pair<Key, Value>

Definition at line 37 of file hash_map.hh.

Constructor & Destructor Documentation

◆ hash_map() [1/2]

template<typename Key, typename Value, typename Hasher = std::hash<Key>, typename Equal = EqualTo>
hash_map< Key, Value, Hasher, Equal >::hash_map ( unsigned  initialSize = 0,
Hasher  hasher_ = Hasher(),
Equal  equal_ = Equal() 
)
inlineexplicit

Definition at line 41 of file hash_map.hh.

◆ hash_map() [2/2]

template<typename Key, typename Value, typename Hasher = std::hash<Key>, typename Equal = EqualTo>
hash_map< Key, Value, Hasher, Equal >::hash_map ( std::initializer_list< std::pair< Key, Value >>  list)
inline

Definition at line 48 of file hash_map.hh.

Member Function Documentation

◆ contains()

template<typename Key, typename Value, typename Hasher = std::hash<Key>, typename Equal = EqualTo>
template<typename K >
bool hash_map< Key, Value, Hasher, Equal >::contains ( const K &  k) const
inline

Definition at line 83 of file hash_map.hh.

◆ insert_or_assign()

template<typename Key, typename Value, typename Hasher = std::hash<Key>, typename Equal = EqualTo>
template<typename K , typename V >
std::pair<iterator, bool> hash_map< Key, Value, Hasher, Equal >::insert_or_assign ( K &&  key,
V &&  value 
)
inline

Definition at line 69 of file hash_map.hh.

◆ operator[]()

template<typename Key, typename Value, typename Hasher = std::hash<Key>, typename Equal = EqualTo>
template<typename K >
Value& hash_map< Key, Value, Hasher, Equal >::operator[] ( K &&  key)
inline

Definition at line 54 of file hash_map.hh.


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