![]() |
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 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.
|
inlineconstexpr |
Definition at line 139 of file hashmap.hpp.
Referenced by HashMap().
|
inline |
|
inline |
Definition at line 147 of file hashmap.hpp.
|
delete |
void insert | ( | const Key & | key, |
const Value & | value ) |
Definition at line 246 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 169 of file hashmap.hpp.
|
inline |
Definition at line 174 of file hashmap.hpp.
|
inline |
|
inline |
Definition at line 194 of file hashmap.hpp.
|
inline |
Definition at line 209 of file hashmap.hpp.
|
inline |
std::optional< Value > get | ( | const Key & | key | ) |
Definition at line 307 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 324 of file hashmap.hpp.
Referenced by do_flush_and_drop_cached_page().
|
inline |
Definition at line 232 of file hashmap.hpp.
|
private |
Definition at line 354 of file hashmap.hpp.
Referenced by insert(), insert(), and operator[]().
|
private |
Definition at line 240 of file hashmap.hpp.
Referenced by begin(), find(), find(), get(), HashMap(), HashMap(), insert(), insert(), operator[](), rehash(), remove(), and ~HashMap().
|
private |
Definition at line 241 of file hashmap.hpp.
Referenced by begin(), end(), end(), find(), find(), get(), HashMap(), HashMap(), insert(), insert(), HashMap< Key, Value, TAllocator >::const_iterator::operator++(), HashMap< Key, Value, TAllocator >::iterator::operator++(), operator[](), rehash(), remove(), and ~HashMap().
|
private |