FastLED 3.9.15
Loading...
Searching...
No Matches
fl::unordered_map_small< Key, Value, Equal > Class Template Reference

Detailed Description

template<typename Key, typename Value, typename Equal = fl::SmallMapEqualTo<Key>>
class fl::unordered_map_small< Key, Value, Equal >

Definition at line 32 of file unordered_map_small.h.

#include <unordered_map_small.h>

+ Collaboration diagram for fl::unordered_map_small< Key, Value, Equal >:

Classes

struct  const_iterator
 
struct  iterator
 

Public Types

enum  insert_result { inserted = 0 , exists = 1 , at_capacity = 2 }
 
using key_equal = Equal
 
using key_type = Key
 
using mapped_type = Value
 
using size_type = fl::size
 
using value_type = fl::pair<Key, Value>
 
using vector_type = fl::vector<value_type>
 

Public Member Functions

 unordered_map_small ()=default
 
 unordered_map_small (const Equal &eq, memory_resource *resource=nullptr) FL_NOEXCEPT
 
 unordered_map_small (const unordered_map_small &other) FL_NOEXCEPT
 
 unordered_map_small (memory_resource *resource) FL_NOEXCEPT
 
 unordered_map_small (unordered_map_small &&other) FL_NOEXCEPT
 
const Value & at (const Key &key) const FL_NOEXCEPT
 
Value & at (const Key &key) FL_NOEXCEPT
 
const_iterator begin () const FL_NOEXCEPT
 
iterator begin () FL_NOEXCEPT
 
size_type capacity () const FL_NOEXCEPT
 
const_iterator cbegin () const FL_NOEXCEPT
 
const_iterator cend () const FL_NOEXCEPT
 
void clear () FL_NOEXCEPT
 
void compact () FL_NOEXCEPT
 
bool contains (const Key &key) const FL_NOEXCEPT
 
size_type count (const Key &key) const FL_NOEXCEPT
 
template<typename... Args>
fl::pair< iterator, bool > emplace (Args &&... args) FL_NOEXCEPT
 
bool empty () const FL_NOEXCEPT
 
const_iterator end () const FL_NOEXCEPT
 
iterator end () FL_NOEXCEPT
 
size_type erase (const Key &key) FL_NOEXCEPT
 
iterator erase (const_iterator pos) FL_NOEXCEPT
 
iterator erase (iterator pos) FL_NOEXCEPT
 
const_iterator find (const Key &key) const FL_NOEXCEPT
 
iterator find (const Key &key) FL_NOEXCEPT
 
Value get (const Key &key, const Value &defaultValue) const FL_NOEXCEPT
 
bool get (const Key &key, Value *out_value) const FL_NOEXCEPT
 
memory_resourceget_memory_resource () const FL_NOEXCEPT
 
bool has (const Key &key) const FL_NOEXCEPT
 
bool insert (const Key &key, const Value &value, insert_result *result=nullptr) FL_NOEXCEPT
 
fl::pair< iterator, bool > insert (const value_type &kv) FL_NOEXCEPT
 
bool insert (Key &&key, Value &&value, insert_result *result=nullptr) FL_NOEXCEPT
 
fl::pair< iterator, bool > insert (value_type &&kv) FL_NOEXCEPT
 
fl::pair< iterator, bool > insert_or_update (const Key &key, const Value &value) FL_NOEXCEPT
 
key_equal key_eq () const FL_NOEXCEPT
 
size_type max_size () const FL_NOEXCEPT
 
bool operator!= (const unordered_map_small &other) const FL_NOEXCEPT
 
unordered_map_smalloperator= (const unordered_map_small &other) FL_NOEXCEPT
 
unordered_map_smalloperator= (unordered_map_small &&other) FL_NOEXCEPT
 
bool operator== (const unordered_map_small &other) const FL_NOEXCEPT
 
Value & operator[] (const Key &key) FL_NOEXCEPT
 
void reserve (size_type n) FL_NOEXCEPT
 
size_type size () const FL_NOEXCEPT
 
void swap (unordered_map_small &other) FL_NOEXCEPT
 
bool update (const Key &key, const Value &value) FL_NOEXCEPT
 
bool update (const Key &key, Value &&value) FL_NOEXCEPT
 

Private Member Functions

size_type append (const value_type &kv) FL_NOEXCEPT
 
size_type append (value_type &&kv) FL_NOEXCEPT
 
size_type do_insert (const value_type &kv) FL_NOEXCEPT
 
size_type do_insert (value_type &&kv) FL_NOEXCEPT
 
size_type find_free_slot () const FL_NOEXCEPT
 
size_type find_index (const Key &key) const FL_NOEXCEPT
 
void place_at (size_type idx, const value_type &kv) FL_NOEXCEPT
 
void place_at (size_type idx, value_type &&kv) FL_NOEXCEPT
 

Static Private Member Functions

static size_type npos () FL_NOEXCEPT
 

Private Attributes

vector_type mData
 
Equal mEqual
 
bitset_dynamic mOccupied
 
memory_resourcemResource = nullptr
 
size_type mSize = 0
 

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