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

Detailed Description

template<typename Key, typename Value, typename Less = fl::less<Key>>
class fl::flat_map< Key, Value, Less >
Examples
Chromancer.ino.

Definition at line 29 of file flat_map.h.

#include <flat_map.h>

+ Inheritance diagram for fl::flat_map< Key, Value, Less >:
+ Collaboration diagram for fl::flat_map< Key, Value, Less >:

Public Types

using const_iterator = typename vector_type::const_iterator
 
using const_pointer = const value_type*
 
using const_reference = const value_type&
 
using const_reverse_iterator = typename vector_type::const_reverse_iterator
 
using difference_type = ptrdiff_t
 
enum  insert_result { inserted = 0 , exists = 1 , at_capacity = 2 }
 
using iterator = typename vector_type::iterator
 
using key_compare = Less
 
using key_type = Key
 
using mapped_type = Value
 
using pointer = value_type*
 
using reference = value_type&
 
using reverse_iterator = typename vector_type::reverse_iterator
 
using size_type = fl::size
 
using value_type = fl::pair<Key, Value>
 
using vector_type = fl::vector<value_type>
 

Public Member Functions

 flat_map ()=default
 
 flat_map (const flat_map &other) FL_NOEXCEPT
 
 flat_map (const Less &less) FL_NOEXCEPT
 
 flat_map (const Less &less, memory_resource *resource) FL_NOEXCEPT
 
 flat_map (flat_map &&other) FL_NOEXCEPT
 
 flat_map (memory_resource *resource) FL_NOEXCEPT
 
const Value & at (const Key &key) const FL_NOEXCEPT
 
Value & at (const Key &key) FL_NOEXCEPT
 
const value_typeback () const FL_NOEXCEPT
 
value_typeback () 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
 
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
 
template<typename... Args>
iterator emplace_hint (const_iterator hint, Args &&... args) FL_NOEXCEPT
 
bool empty () const FL_NOEXCEPT
 
const_iterator end () const FL_NOEXCEPT
 
iterator end () FL_NOEXCEPT
 
fl::pair< const_iterator, const_iteratorequal_range (const Key &key) const FL_NOEXCEPT
 
fl::pair< iterator, iteratorequal_range (const Key &key) FL_NOEXCEPT
 
size_type erase (const Key &key) FL_NOEXCEPT
 
iterator erase (const_iterator first, const_iterator last) 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
 
const value_typefront () const FL_NOEXCEPT
 
value_typefront () FL_NOEXCEPT
 
bool full () const 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 &value) FL_NOEXCEPT
 
iterator insert (const_iterator, const value_type &value) FL_NOEXCEPT
 
iterator insert (const_iterator, value_type &&value) FL_NOEXCEPT
 
bool insert (Key &&key, Value &&value, insert_result *result=nullptr) FL_NOEXCEPT
 
fl::pair< iterator, bool > insert (value_type &&value) FL_NOEXCEPT
 
fl::pair< iterator, bool > insert_or_update (const Key &key, const Value &value) FL_NOEXCEPT
 
key_compare key_comp () const FL_NOEXCEPT
 
const_iterator lower_bound (const Key &key) const FL_NOEXCEPT
 
iterator lower_bound (const Key &key) FL_NOEXCEPT
 
size_type max_size () const FL_NOEXCEPT
 
bool next (const Key &key, Key *next_key, bool allow_rollover=false) const FL_NOEXCEPT
 
flat_mapoperator= (const flat_map &other)=default
 
flat_mapoperator= (flat_map &&other) FL_NOEXCEPT
 
Value & operator[] (const Key &key) FL_NOEXCEPT
 
bool prev (const Key &key, Key *prev_key, bool allow_rollover=false) const FL_NOEXCEPT
 
const_reverse_iterator rbegin () const FL_NOEXCEPT
 
reverse_iterator rbegin () FL_NOEXCEPT
 
const_reverse_iterator rend () const FL_NOEXCEPT
 
reverse_iterator rend () FL_NOEXCEPT
 
void reserve (size_type n) FL_NOEXCEPT
 
void shrink_to_fit () FL_NOEXCEPT
 
size_type size () const FL_NOEXCEPT
 
void swap (flat_map &other) FL_NOEXCEPT
 
bool update (const Key &key, const Value &value) FL_NOEXCEPT
 
bool update (const Key &key, Value &&value) FL_NOEXCEPT
 
const_iterator upper_bound (const Key &key) const FL_NOEXCEPT
 
iterator upper_bound (const Key &key) FL_NOEXCEPT
 

Private Attributes

vector_type mData
 
Less mLess
 

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