![]() |
MOS Source Code
|
#include <hashmap.hpp>
Classes | |
| struct | chain |
| class | const_iterator |
| class | iterator |
Public Types | |
| typedef std::tuple< const Key, Value > | entry_type |
Public Member Functions | |
| constexpr | HashMap () |
| HashMap (std::initializer_list< entry_type > init) | |
| ~HashMap () | |
| HashMap (const HashMap &)=delete | |
| void | insert (const Key &key, const Value &value) |
| void | insert (const Key &key, Value &&value) |
| Value & | operator[] (const Key &key) |
| bool | empty () |
| iterator | end () |
| iterator | find (const Key &key) |
| iterator | begin () |
| const_iterator | end () const |
| const_iterator | find (const Key &key) const |
| std::optional< Value > | get (const Key &key) |
| std::optional< Value > | remove (const Key &key) |
| size_t | size () const |
Private Types | |
| using | ChainAllocator = mos::default_allocator<chain *> |
Private Member Functions | |
| void | rehash () |
Private Attributes | |
| chain ** | _table |
| size_t | _capacity |
| size_t | _size |
Definition at line 19 of file hashmap.hpp.
| typedef std::tuple<const Key, Value> entry_type |
Definition at line 22 of file hashmap.hpp.
|
private |
Definition at line 32 of file hashmap.hpp.
|
inlineconstexpr |
Definition at line 140 of file hashmap.hpp.
Referenced by HashMap().
|
inline |
|
inline |
Definition at line 148 of file hashmap.hpp.
| void insert | ( | const Key & | key, |
| const Value & | value ) |
Definition at line 247 of file hashmap.hpp.
Referenced by HashMap(), and pagecache_get_page_for_read().
| void insert | ( | const Key & | key, |
| Value && | value ) |
| Value & operator[] | ( | const Key & | key | ) |
|
inline |
Definition at line 170 of file hashmap.hpp.
|
inline |
Definition at line 175 of file hashmap.hpp.
|
inline |
|
inline |
Definition at line 195 of file hashmap.hpp.
|
inline |
Definition at line 210 of file hashmap.hpp.
|
inline |
| std::optional< Value > get | ( | const Key & | key | ) |
Definition at line 308 of file hashmap.hpp.
Referenced by pagecache_flush_or_drop(), and pagecache_get_page_for_read().
| std::optional< Value > remove | ( | const Key & | key | ) |
Definition at line 325 of file hashmap.hpp.
Referenced by do_flush_and_drop_cached_page().
|
inline |
Definition at line 233 of file hashmap.hpp.
|
private |
Definition at line 355 of file hashmap.hpp.
Referenced by insert(), insert(), and operator[]().
|
private |
Definition at line 241 of file hashmap.hpp.
Referenced by begin(), find(), find(), get(), HashMap(), HashMap(), insert(), insert(), operator[](), rehash(), remove(), and ~HashMap().
|
private |
Definition at line 242 of file hashmap.hpp.
Referenced by begin(), end(), end(), find(), find(), get(), HashMap(), HashMap(), insert(), insert(), HashMap< Key, Value >::const_iterator::operator++(), HashMap< Key, Value >::iterator::operator++(), operator[](), rehash(), remove(), and ~HashMap().
|
private |