FastLED 3.9.7
Loading...
Searching...
No Matches
fl::FixedMap< Key, Value, N > Class Template Reference

Detailed Description

template<typename Key, typename Value, size_t N>
class fl::FixedMap< Key, Value, N >

Definition at line 20 of file map.h.

Public Types

using PairKV = fl::Pair<Key, Value>
 
typedef FixedVector< PairKV, N > VectorType
 
typedef VectorType::iterator iterator
 
typedef VectorType::const_iterator const_iterator
 

Public Member Functions

iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 
iterator find (const Key &key)
 
const_iterator find (const Key &key) const
 
template<typename Less >
iterator lowest (Less less_than=Less())
 
template<typename Less >
const_iterator lowest (Less less_than=Less()) const
 
template<typename Less >
iterator highest (Less less_than=Less())
 
template<typename Less >
const_iterator highest (Less less_than=Less()) const
 
bool get (const Key &key, Value *value) const
 
Value get (const Key &key, bool *has=nullptr) const
 
Pair< bool, iterator > insert (const Key &key, const Value &value, InsertResult *result=nullptr)
 
bool update (const Key &key, const Value &value, bool insert_if_missing=true)
 
Value & operator[] (const Key &key)
 
const Value & operator[] (const Key &key) const
 
bool next (const Key &key, Key *next_key, bool allow_rollover=false) const
 
bool prev (const Key &key, Key *prev_key, bool allow_rollover=false) const
 
constexpr size_t size () const
 
constexpr bool empty () const
 
constexpr size_t capacity () const
 
void clear ()
 
bool has (const Key &it) const
 

Member Typedef Documentation

◆ const_iterator

template<typename Key , typename Value , size_t N>
typedef VectorType::const_iterator fl::FixedMap< Key, Value, N >::const_iterator

Definition at line 26 of file map.h.

◆ iterator

template<typename Key , typename Value , size_t N>
typedef VectorType::iterator fl::FixedMap< Key, Value, N >::iterator

Definition at line 25 of file map.h.

◆ PairKV

template<typename Key , typename Value , size_t N>
using fl::FixedMap< Key, Value, N >::PairKV = fl::Pair<Key, Value>

Definition at line 22 of file map.h.

◆ VectorType

template<typename Key , typename Value , size_t N>
typedef FixedVector<PairKV, N> fl::FixedMap< Key, Value, N >::VectorType

Definition at line 24 of file map.h.

Member Function Documentation

◆ begin() [1/2]

template<typename Key , typename Value , size_t N>
iterator fl::FixedMap< Key, Value, N >::begin ( )
inline

Definition at line 32 of file map.h.

◆ begin() [2/2]

template<typename Key , typename Value , size_t N>
const_iterator fl::FixedMap< Key, Value, N >::begin ( ) const
inline

Definition at line 38 of file map.h.

◆ capacity()

template<typename Key , typename Value , size_t N>
size_t fl::FixedMap< Key, Value, N >::capacity ( ) const
inlineconstexpr

Definition at line 226 of file map.h.

◆ clear()

template<typename Key , typename Value , size_t N>
void fl::FixedMap< Key, Value, N >::clear ( )
inline

Definition at line 231 of file map.h.

◆ empty()

template<typename Key , typename Value , size_t N>
bool fl::FixedMap< Key, Value, N >::empty ( ) const
inlineconstexpr

Definition at line 221 of file map.h.

◆ end() [1/2]

template<typename Key , typename Value , size_t N>
iterator fl::FixedMap< Key, Value, N >::end ( )
inline

Definition at line 35 of file map.h.

◆ end() [2/2]

template<typename Key , typename Value , size_t N>
const_iterator fl::FixedMap< Key, Value, N >::end ( ) const
inline

Definition at line 41 of file map.h.

◆ find() [1/2]

template<typename Key , typename Value , size_t N>
iterator fl::FixedMap< Key, Value, N >::find ( const Key & key)
inline

Definition at line 45 of file map.h.

◆ find() [2/2]

template<typename Key , typename Value , size_t N>
const_iterator fl::FixedMap< Key, Value, N >::find ( const Key & key) const
inline

Definition at line 54 of file map.h.

◆ get() [1/2]

template<typename Key , typename Value , size_t N>
Value fl::FixedMap< Key, Value, N >::get ( const Key & key,
bool * has = nullptr ) const
inline

Definition at line 118 of file map.h.

◆ get() [2/2]

template<typename Key , typename Value , size_t N>
bool fl::FixedMap< Key, Value, N >::get ( const Key & key,
Value * value ) const
inline

Definition at line 109 of file map.h.

◆ has()

template<typename Key , typename Value , size_t N>
bool fl::FixedMap< Key, Value, N >::has ( const Key & it) const
inline

Definition at line 235 of file map.h.

◆ highest() [1/2]

template<typename Key , typename Value , size_t N>
template<typename Less >
iterator fl::FixedMap< Key, Value, N >::highest ( Less less_than = Less())
inline

Definition at line 86 of file map.h.

◆ highest() [2/2]

template<typename Key , typename Value , size_t N>
template<typename Less >
const_iterator fl::FixedMap< Key, Value, N >::highest ( Less less_than = Less()) const
inline

Definition at line 97 of file map.h.

◆ insert()

template<typename Key , typename Value , size_t N>
Pair< bool, iterator > fl::FixedMap< Key, Value, N >::insert ( const Key & key,
const Value & value,
InsertResult * result = nullptr )
inline

Definition at line 132 of file map.h.

◆ lowest() [1/2]

template<typename Key , typename Value , size_t N>
template<typename Less >
iterator fl::FixedMap< Key, Value, N >::lowest ( Less less_than = Less())
inline

Definition at line 64 of file map.h.

◆ lowest() [2/2]

template<typename Key , typename Value , size_t N>
template<typename Less >
const_iterator fl::FixedMap< Key, Value, N >::lowest ( Less less_than = Less()) const
inline

Definition at line 75 of file map.h.

◆ next()

template<typename Key , typename Value , size_t N>
bool fl::FixedMap< Key, Value, N >::next ( const Key & key,
Key * next_key,
bool allow_rollover = false ) const
inline

Definition at line 185 of file map.h.

◆ operator[]() [1/2]

template<typename Key , typename Value , size_t N>
Value & fl::FixedMap< Key, Value, N >::operator[] ( const Key & key)
inline

Definition at line 167 of file map.h.

◆ operator[]() [2/2]

template<typename Key , typename Value , size_t N>
const Value & fl::FixedMap< Key, Value, N >::operator[] ( const Key & key) const
inline

Definition at line 176 of file map.h.

◆ prev()

template<typename Key , typename Value , size_t N>
bool fl::FixedMap< Key, Value, N >::prev ( const Key & key,
Key * prev_key,
bool allow_rollover = false ) const
inline

Definition at line 200 of file map.h.

◆ size()

template<typename Key , typename Value , size_t N>
size_t fl::FixedMap< Key, Value, N >::size ( ) const
inlineconstexpr

Definition at line 217 of file map.h.

◆ update()

template<typename Key , typename Value , size_t N>
bool fl::FixedMap< Key, Value, N >::update ( const Key & key,
const Value & value,
bool insert_if_missing = true )
inline

Definition at line 156 of file map.h.


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