|
| string_key_store (const allocator_type &allocator=allocator_type()) |
| Constructor. More...
|
|
| string_key_store (const bool unique, const uint64_t hash_seed, const allocator_type &allocator=allocator_type()) |
| Constructor. More...
|
|
| string_key_store (const string_key_store &)=default |
| Copy constructor. More...
|
|
| string_key_store (const string_key_store &other, const allocator_type &alloc) |
| Allocator-extended copy constructor. More...
|
|
| string_key_store (string_key_store &&) noexcept=default |
| Move constructor. More...
|
|
| string_key_store (string_key_store &&other, const allocator_type &alloc) noexcept |
| Allocator-extended move constructor. More...
|
|
string_key_store & | operator= (const string_key_store &)=default |
| Copy assignment operator. More...
|
|
string_key_store & | operator= (string_key_store &&) noexcept=default |
| Move assignment operator. More...
|
|
bool | insert (const key_type &key) |
| Inserts a key with the default value. If the unique parameter in the constructor was set to true and a duplicate key item already exists, this function does nothing and returns false. More...
|
|
bool | insert (const key_type &key, const value_type &value) |
| Inserts an item. Suppose the unique parameter was set to true in the constructor and a duplicate key item exists. In that case, this function just updates the value of the existing one. More...
|
|
bool | insert (const key_type &key, value_type &&value) |
| Insert() with move operator version. More...
|
|
void | clear () |
| Clear all contents. This call does not reduce the memory usage. More...
|
|
std::size_t | count (const key_type &key) const |
| Counts the number of items associated with the key. More...
|
|
std::size_t | size () const |
| Returns the number of elements in this container. More...
|
|
const key_type | key (const locator_type &position) const |
| Returns the key of the element at 'position'. More...
|
|
value_type & | value (const locator_type &position) |
| Returns the value of the element at 'position'. More...
|
|
const value_type & | value (const locator_type &position) const |
| Returns the value of the element at 'position'. More...
|
|
locator_type | find (const key_type &key) const |
| Finds an element with key equivalent to 'key'. More...
|
|
std::pair< locator_type, locator_type > | equal_range (const key_type &key) const |
| Returns a range containing all elements with key key in the container. More...
|
|
locator_type | begin () const |
| Return an iterator that points the first element in the container. More...
|
|
locator_type | end () const |
| Returns an iterator to the element following the last element. More...
|
|
std::size_t | erase (const key_type &key) |
| Removes all elements with the key equivalent to key. More...
|
|
locator_type | erase (const locator_type &position) |
| Removes the element at 'position'. More...
|
|
std::size_t | max_id_probe_distance () const |
| Returns the maximum ID probe distance. In other words, the maximum number of key pairs that have the same hash value. More...
|
|
void | rehash () |
| Rehash elements. More...
|
|
allocator_type | get_allocator () |
| Returns an instance of the internal allocator. More...
|
|
bool | unique () const |
| Returns if this container inserts keys uniquely. More...
|
|
bool | hash_seed () const |
| Returns the hash seed. More...
|
|
template<typename _value_type, typename allocator_type = metall::manager::allocator_type<std::byte>>
class metall::container::string_key_store< _value_type, allocator_type >
A ke-value store that uses string for its key.
- Warning
- This container is designed to work as the top-level container, i.e., it does not work if used inside another container.
- Template Parameters
-
_value_type | A value type. |
allocator_type | An allocator type. |