openMSX
|
#include <hash_map.hh>
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< Value, Extractor, Hasher, Equal > | |
using | value_type = Value |
using | iterator = Iter< hash_set, Value > |
using | const_iterator = Iter< const hash_set, const Value > |
Public Member Functions | |
hash_map (unsigned initialSize=0, Hasher hasher_=Hasher(), Equal equal_=Equal()) | |
explicit (false) hash_map(std | |
template<typename K > | |
Value & | operator[] (K &&key) |
template<typename K , typename... Args> | |
std::pair< iterator, bool > | try_emplace (K &&key, Args &&...args) |
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< Value, Extractor, Hasher, Equal > | |
hash_set (unsigned initialSize=0, Extractor extract_=Extractor(), Hasher hasher_=Hasher(), Equal equal_=Equal()) | |
hash_set (const hash_set &source) | |
hash_set (hash_set &&source) noexcept | |
hash_set (std::initializer_list< Value > args) | |
~hash_set () | |
hash_set & | operator= (const hash_set &source) |
hash_set & | operator= (hash_set &&source) noexcept |
template<typename K > | |
bool | contains (const K &key) const |
template<typename V > | |
std::pair< iterator, bool > | insert (V &&value) |
template<typename V > | |
std::pair< iterator, bool > | insert_noCapacityCheck (V &&value) |
template<typename V > | |
iterator | insert_noDuplicateCheck (V &&value) |
template<typename V > | |
iterator | insert_noCapacityCheck_noDuplicateCheck (V &&value) |
template<typename... Args> | |
std::pair< iterator, bool > | emplace (Args &&... args) |
template<typename... Args> | |
std::pair< iterator, bool > | emplace_noCapacityCheck (Args &&... args) |
template<typename... Args> | |
iterator | emplace_noDuplicateCheck (Args &&... args) |
template<typename... Args> | |
iterator | emplace_noCapacityCheck_noDuplicateCheck (Args &&... args) |
template<typename K > | |
bool | erase (const K &key) |
void | erase (iterator it) |
bool | empty () const |
unsigned | size () const |
void | clear () |
template<typename K > | |
iterator | find (const K &key) |
template<typename K > | |
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) |
Additional Inherited Members | |
Protected Types inherited from hash_set< Value, Extractor, Hasher, Equal > | |
using | PoolIndex = hash_set_impl::PoolIndex |
Protected Member Functions inherited from hash_set< Value, Extractor, Hasher, Equal > | |
template<bool CHECK_CAPACITY, bool CHECK_DUPLICATE, typename V > | |
std::pair< iterator, bool > | insert_impl (V &&value) |
template<bool CHECK_CAPACITY, bool CHECK_DUPLICATE, typename... Args> | |
std::pair< iterator, bool > | emplace_impl (Args &&... args) |
void | grow () |
void | rehash (unsigned oldCount) |
template<typename K > | |
PoolIndex | locateElement (const K &key) const |
Static Protected Member Functions inherited from hash_set< Value, Extractor, Hasher, Equal > | |
static unsigned | nextPowerOf2 (unsigned x) |
Protected Attributes inherited from hash_set< Value, Extractor, Hasher, Equal > | |
PoolIndex * | table = nullptr |
hash_set_impl::Pool< Value > | pool |
unsigned | allocMask = unsigned(-1) |
unsigned | elemCount = 0 |
Extractor | extract |
Hasher | hasher |
Equal | equal |
Static Protected Attributes inherited from hash_set< Value, Extractor, Hasher, Equal > | |
static constexpr auto | invalidIndex = hash_set_impl::invalidIndex |
Definition at line 31 of file hash_map.hh.
using hash_map< Key, Value, Hasher, Equal >::const_iterator = typename BaseType::const_iterator |
Definition at line 39 of file hash_map.hh.
using hash_map< Key, Value, Hasher, Equal >::iterator = typename BaseType:: iterator |
Definition at line 38 of file hash_map.hh.
using hash_map< Key, Value, Hasher, Equal >::key_type = Key |
Definition at line 35 of file hash_map.hh.
using hash_map< Key, Value, Hasher, Equal >::mapped_type = Value |
Definition at line 36 of file hash_map.hh.
using hash_map< Key, Value, Hasher, Equal >::value_type = std::pair<Key, Value> |
Definition at line 37 of file hash_map.hh.
|
inlineexplicit |
Definition at line 41 of file hash_map.hh.
|
inline |
Definition at line 110 of file hash_map.hh.
References hash_set< Value, Extractor, Hasher, Equal >::end(), and hash_set< Value, Extractor, Hasher, Equal >::find().
Referenced by openmsx::InputArchiveBase2::addPointer().
|
inline |
Definition at line 48 of file hash_map.hh.
|
inline |
Definition at line 99 of file hash_map.hh.
References hash_map< Key, Value, Hasher, Equal >::try_emplace().
Referenced by openmsx::SettingsConfig::setValueForSetting().
|
inline |
Definition at line 54 of file hash_map.hh.
References hash_set< Value, Extractor, Hasher, Equal >::end(), hash_set< Value, Extractor, Hasher, Equal >::find(), and hash_set< Value, Extractor, Hasher, Equal >::insert().
|
inline |
Definition at line 65 of file hash_map.hh.
References hash_set< Value, Extractor, Hasher, Equal >::allocMask, hash_set< Value, Extractor, Hasher, Equal >::elemCount, hash_set< Value, Extractor, Hasher, Equal >::grow(), hash_set< Value, Extractor, Hasher, Equal >::hasher, hash_set< Value, Extractor, Hasher, Equal >::invalidIndex, hash_set< Value, Extractor, Hasher, Equal >::pool, and hash_set< Value, Extractor, Hasher, Equal >::table.
Referenced by hash_map< Key, Value, Hasher, Equal >::insert_or_assign().