Embedded Template Library 1.0
flat_multimap

Classes

class  etl::iflat_multimap< TKey, TMapped, TKeyCompare >
 
class  etl::flat_multimap< TKey, TValue, MAX_SIZE_, TCompare >
 

Functions

template<typename TKey , typename TMapped , typename TKeyCompare >
bool etl::operator== (const etl::iflat_multimap< TKey, TMapped, TKeyCompare > &lhs, const etl::iflat_multimap< TKey, TMapped, TKeyCompare > &rhs)
 
template<typename TKey , typename TMapped , typename TKeyCompare >
bool etl::operator!= (const etl::iflat_multimap< TKey, TMapped, TKeyCompare > &lhs, const etl::iflat_multimap< TKey, TMapped, TKeyCompare > &rhs)
 

Detailed Description

A flat_multimap with the capacity defined at compile time. Has insertion of O(N) and find of O(logN) Duplicate entries and not allowed.


Class Documentation

◆ etl::iflat_multimap

class etl::iflat_multimap
template<typename TKey, typename TMapped, typename TKeyCompare = etl::less<TKey>>
class etl::iflat_multimap< TKey, TMapped, TKeyCompare >

The base class for specifically sized flat_multimaps. Can be used as a reference type for all flat_multimaps containing a specific type.

Public Types

typedef ETL_OR_STD::pair< const TKey, TMapped > value_type
 
typedef TKey key_type
 
typedef TMapped mapped_type
 
typedef TKeyCompare key_compare
 
typedef value_type & reference
 
typedef const value_type & const_reference
 
typedef value_type * pointer
 
typedef const value_type * const_pointer
 
typedef size_t size_type
 
typedef const key_type & const_key_reference
 
typedef refmap_t::iterator iterator
 
typedef refmap_t::const_iterator const_iterator
 
typedef ETL_OR_STD::reverse_iterator< iteratorreverse_iterator
 
typedef ETL_OR_STD::reverse_iterator< const_iteratorconst_reverse_iterator
 
typedef etl::iterator_traits< iterator >::difference_type difference_type
 
- Public Types inherited from etl::ireference_flat_multimap< TKey, TMapped, etl::less< TKey > >
typedef ETL_OR_STD::pair< const TKey, TMapped > value_type
 
typedef TKey key_type
 
typedef TMapped mapped_type
 
typedef etl::less< TKey > key_compare
 
typedef value_type & reference
 
typedef const value_type & const_reference
 
typedef value_type * pointer
 
typedef const value_type * const_pointer
 
typedef size_t size_type
 
typedef ETL_OR_STD::reverse_iterator< iteratorreverse_iterator
 
typedef ETL_OR_STD::reverse_iterator< const_iterator > const_reverse_iterator
 
typedef etl::iterator_traits< iterator >::difference_type difference_type
 

Public Member Functions

iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
const_iterator cbegin () const
 
const_iterator cend () const
 
reverse_iterator rbegin ()
 
const_reverse_iterator rbegin () const
 
reverse_iterator rend ()
 
const_reverse_iterator rend () const
 
const_reverse_iterator crbegin () const
 
const_reverse_iterator crend () const
 
template<typename TIterator >
void assign (TIterator first, TIterator last)
 
ETL_OR_STD::pair< iterator, bool > insert (const value_type &value)
 
iterator insert (const_iterator, const value_type &value)
 
template<class TIterator >
void insert (TIterator first, TIterator last)
 
ETL_OR_STD::pair< iterator, bool > emplace (const value_type &value)
 Emplaces a value to the map.
 
ETL_OR_STD::pair< iterator, bool > emplace (const key_type &key, const mapped_type &mapped)
 Emplaces a value to the map.
 
template<typename T1 >
ETL_OR_STD::pair< iterator, bool > emplace (const key_type &key, const T1 &value1)
 Emplaces a value to the map.
 
template<typename T1 , typename T2 >
ETL_OR_STD::pair< iterator, bool > emplace (const key_type &key, const T1 &value1, const T2 &value2)
 Emplaces a value to the map.
 
template<typename T1 , typename T2 , typename T3 >
ETL_OR_STD::pair< iterator, bool > emplace (const key_type &key, const T1 &value1, const T2 &value2, const T3 &value3)
 Emplaces a value to the map.
 
template<typename T1 , typename T2 , typename T3 , typename T4 >
ETL_OR_STD::pair< iterator, bool > emplace (const key_type &key, const T1 &value1, const T2 &value2, const T3 &value3, const T4 &value4)
 Emplaces a value to the map.
 
size_t erase (const_key_reference key)
 
iterator erase (iterator i_element)
 
iterator erase (const_iterator i_element)
 
iterator erase (const_iterator first, const_iterator last)
 
void clear ()
 Clears the flat_multimap.
 
iterator find (const_key_reference key)
 
const_iterator find (const_key_reference key) const
 
size_t count (const_key_reference key) const
 
iterator lower_bound (const_key_reference key)
 
const_iterator lower_bound (const_key_reference key) const
 
iterator upper_bound (const_key_reference key)
 
const_iterator upper_bound (const_key_reference key) const
 
ETL_OR_STD::pair< iterator, iteratorequal_range (const_key_reference key)
 
ETL_OR_STD::pair< const_iterator, const_iteratorequal_range (const_key_reference key) const
 
bool contains (const_key_reference key) const
 Check if the map contains the key.
 
iflat_multimapoperator= (const iflat_multimap &rhs)
 Assignment operator.
 
size_type size () const
 
bool empty () const
 
bool full () const
 
size_type capacity () const
 
size_type max_size () const
 
size_t available () const
 
- Public Member Functions inherited from etl::ireference_flat_multimap< TKey, TMapped, etl::less< TKey > >
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
const_iterator cbegin () const
 
const_iterator cend () const
 
reverse_iterator rbegin ()
 
const_reverse_iterator rbegin () const
 
reverse_iterator rend ()
 
const_reverse_iterator rend () const
 
const_reverse_iterator crbegin () const
 
const_reverse_iterator crend () const
 
void assign (TIterator first, TIterator last)
 
ETL_OR_STD::pair< iterator, bool > insert (value_type &value)
 
iterator insert (const_iterator, const value_type &value)
 
void insert (TIterator first, TIterator last)
 
size_t erase (key_parameter_t key)
 
iterator erase (iterator i_element)
 
iterator erase (const_iterator i_element)
 
iterator erase (const_iterator first, const_iterator last)
 
void clear ()
 Clears the reference_flat_multimap.
 
iterator find (key_parameter_t key)
 
const_iterator find (key_parameter_t key) const
 
size_t count (key_parameter_t key) const
 
iterator lower_bound (key_parameter_t key)
 
const_iterator lower_bound (key_parameter_t key) const
 
iterator upper_bound (key_parameter_t key)
 
const_iterator upper_bound (key_parameter_t key) const
 
ETL_OR_STD::pair< iterator, iteratorequal_range (key_parameter_t key)
 
ETL_OR_STD::pair< const_iterator, const_iterator > equal_range (key_parameter_t key) const
 
bool contains (const TKey &key) const
 Check if the map contains the key.
 
size_type size () const
 
bool empty () const
 
bool full () const
 
size_type capacity () const
 
size_type max_size () const
 
size_t available () const
 

Protected Member Functions

 iflat_multimap (lookup_t &lookup_, storage_t &storage_)
 Constructor.
 
 ~iflat_multimap ()
 Internal debugging. More...
 
- Protected Member Functions inherited from etl::ireference_flat_multimap< TKey, TMapped, etl::less< TKey > >
 ireference_flat_multimap (lookup_t &lookup_)
 Constructor.
 
ETL_OR_STD::pair< iterator, bool > insert_at (iterator i_element, value_type &value)
 
 ~ireference_flat_multimap ()
 Destructor.
 

Additional Inherited Members

- Protected Types inherited from etl::ireference_flat_multimap< TKey, TMapped, etl::less< TKey > >
typedef etl::ivector< value_type * > lookup_t
 
typedef const TKey & key_parameter_t
 

Constructor & Destructor Documentation

◆ ~iflat_multimap()

template<typename TKey , typename TMapped , typename TKeyCompare = etl::less<TKey>>
etl::iflat_multimap< TKey, TMapped, TKeyCompare >::~iflat_multimap ( )
inlineprotected

Internal debugging.

Destructor.

Member Function Documentation

◆ assign()

template<typename TKey , typename TMapped , typename TKeyCompare = etl::less<TKey>>
template<typename TIterator >
void etl::iflat_multimap< TKey, TMapped, TKeyCompare >::assign ( TIterator  first,
TIterator  last 
)
inline

Assigns values to the flat_multimap. If asserts or exceptions are enabled, emits flat_multimap_full if the flat_multimap does not have enough free space. If asserts or exceptions are enabled, emits flat_multimap_iterator if the iterators are reversed.

Parameters
firstThe iterator to the first element.
lastThe iterator to the last element + 1.

◆ available()

template<typename TKey , typename TMapped , typename TKeyCompare = etl::less<TKey>>
size_t etl::iflat_multimap< TKey, TMapped, TKeyCompare >::available ( ) const
inline

Returns the remaining capacity.

Returns
The remaining capacity.

◆ begin() [1/2]

template<typename TKey , typename TMapped , typename TKeyCompare = etl::less<TKey>>
iterator etl::iflat_multimap< TKey, TMapped, TKeyCompare >::begin ( )
inline

Returns an iterator to the beginning of the flat_multimap.

Returns
An iterator to the beginning of the flat_multimap.

◆ begin() [2/2]

template<typename TKey , typename TMapped , typename TKeyCompare = etl::less<TKey>>
const_iterator etl::iflat_multimap< TKey, TMapped, TKeyCompare >::begin ( ) const
inline

Returns a const_iterator to the beginning of the flat_multimap.

Returns
A const iterator to the beginning of the flat_multimap.

◆ capacity()

template<typename TKey , typename TMapped , typename TKeyCompare = etl::less<TKey>>
size_type etl::iflat_multimap< TKey, TMapped, TKeyCompare >::capacity ( ) const
inline

Returns the capacity of the flat_multiset.

Returns
The capacity of the flat_multiset.

◆ cbegin()

template<typename TKey , typename TMapped , typename TKeyCompare = etl::less<TKey>>
const_iterator etl::iflat_multimap< TKey, TMapped, TKeyCompare >::cbegin ( ) const
inline

Returns a const_iterator to the beginning of the flat_multimap.

Returns
A const iterator to the beginning of the flat_multimap.

◆ cend()

template<typename TKey , typename TMapped , typename TKeyCompare = etl::less<TKey>>
const_iterator etl::iflat_multimap< TKey, TMapped, TKeyCompare >::cend ( ) const
inline

Returns a const_iterator to the end of the flat_multimap.

Returns
A const iterator to the end of the flat_multimap.

◆ count()

template<typename TKey , typename TMapped , typename TKeyCompare = etl::less<TKey>>
size_t etl::iflat_multimap< TKey, TMapped, TKeyCompare >::count ( const_key_reference  key) const
inline

Counts an element.

Parameters
keyThe key to search for.
Returns
1 if the key exists, otherwise 0.

◆ crbegin()

template<typename TKey , typename TMapped , typename TKeyCompare = etl::less<TKey>>
const_reverse_iterator etl::iflat_multimap< TKey, TMapped, TKeyCompare >::crbegin ( ) const
inline

Returns a const reverse iterator to the reverse beginning of the flat_multimap.

Returns
Const reverse iterator to the reverse beginning of the flat_multimap.

◆ crend()

template<typename TKey , typename TMapped , typename TKeyCompare = etl::less<TKey>>
const_reverse_iterator etl::iflat_multimap< TKey, TMapped, TKeyCompare >::crend ( ) const
inline

Returns a const reverse iterator to the end + 1 of the flat_multimap.

Returns
Const reverse iterator to the end + 1 of the flat_multimap.

◆ empty()

template<typename TKey , typename TMapped , typename TKeyCompare = etl::less<TKey>>
bool etl::iflat_multimap< TKey, TMapped, TKeyCompare >::empty ( ) const
inline

Checks the 'empty' state of the flat_multiset.

Returns
true if empty.

◆ end() [1/2]

template<typename TKey , typename TMapped , typename TKeyCompare = etl::less<TKey>>
iterator etl::iflat_multimap< TKey, TMapped, TKeyCompare >::end ( )
inline

Returns an iterator to the end of the flat_multimap.

Returns
An iterator to the end of the flat_multimap.

◆ end() [2/2]

template<typename TKey , typename TMapped , typename TKeyCompare = etl::less<TKey>>
const_iterator etl::iflat_multimap< TKey, TMapped, TKeyCompare >::end ( ) const
inline

Returns a const_iterator to the end of the flat_multimap.

Returns
A const iterator to the end of the flat_multimap.

◆ equal_range() [1/2]

template<typename TKey , typename TMapped , typename TKeyCompare = etl::less<TKey>>
ETL_OR_STD::pair< iterator, iterator > etl::iflat_multimap< TKey, TMapped, TKeyCompare >::equal_range ( const_key_reference  key)
inline

Finds the range of equal elements of a key

Parameters
keyThe key to search for.
Returns
An iterator pair.

◆ equal_range() [2/2]

template<typename TKey , typename TMapped , typename TKeyCompare = etl::less<TKey>>
ETL_OR_STD::pair< const_iterator, const_iterator > etl::iflat_multimap< TKey, TMapped, TKeyCompare >::equal_range ( const_key_reference  key) const
inline

Finds the range of equal elements of a key

Parameters
keyThe key to search for.
Returns
An iterator pair.

◆ erase() [1/4]

template<typename TKey , typename TMapped , typename TKeyCompare = etl::less<TKey>>
iterator etl::iflat_multimap< TKey, TMapped, TKeyCompare >::erase ( const_iterator  first,
const_iterator  last 
)
inline

Erases a range of elements. The range includes all the elements between first and last, including the element pointed by first, but not the one pointed by last.

Parameters
firstIterator to the first element.
lastIterator to the last element.

◆ erase() [2/4]

template<typename TKey , typename TMapped , typename TKeyCompare = etl::less<TKey>>
iterator etl::iflat_multimap< TKey, TMapped, TKeyCompare >::erase ( const_iterator  i_element)
inline

Erases an element.

Parameters
i_elementIterator to the element.

◆ erase() [3/4]

template<typename TKey , typename TMapped , typename TKeyCompare = etl::less<TKey>>
size_t etl::iflat_multimap< TKey, TMapped, TKeyCompare >::erase ( const_key_reference  key)
inline

Erases an element.

Parameters
keyThe key to erase.
Returns
The number of elements erased. 0 or 1.

◆ erase() [4/4]

template<typename TKey , typename TMapped , typename TKeyCompare = etl::less<TKey>>
iterator etl::iflat_multimap< TKey, TMapped, TKeyCompare >::erase ( iterator  i_element)
inline

Erases an element.

Parameters
i_elementIterator to the element.

◆ find() [1/2]

template<typename TKey , typename TMapped , typename TKeyCompare = etl::less<TKey>>
iterator etl::iflat_multimap< TKey, TMapped, TKeyCompare >::find ( const_key_reference  key)
inline

Finds an element.

Parameters
keyThe key to search for.
Returns
An iterator pointing to the element or end() if not found.

◆ find() [2/2]

template<typename TKey , typename TMapped , typename TKeyCompare = etl::less<TKey>>
const_iterator etl::iflat_multimap< TKey, TMapped, TKeyCompare >::find ( const_key_reference  key) const
inline

Finds an element.

Parameters
keyThe key to search for.
Returns
An iterator pointing to the element or end() if not found.

◆ full()

template<typename TKey , typename TMapped , typename TKeyCompare = etl::less<TKey>>
bool etl::iflat_multimap< TKey, TMapped, TKeyCompare >::full ( ) const
inline

Checks the 'full' state of the flat_multiset.

Returns
true if full.

◆ insert() [1/3]

template<typename TKey , typename TMapped , typename TKeyCompare = etl::less<TKey>>
ETL_OR_STD::pair< iterator, bool > etl::iflat_multimap< TKey, TMapped, TKeyCompare >::insert ( const value_type &  value)
inline

Inserts a value to the flat_multimap. If asserts or exceptions are enabled, emits flat_multimap_full if the flat_multimap is already full.

Parameters
valueThe value to insert.

◆ insert() [2/3]

template<typename TKey , typename TMapped , typename TKeyCompare = etl::less<TKey>>
iterator etl::iflat_multimap< TKey, TMapped, TKeyCompare >::insert ( const_iterator  ,
const value_type &  value 
)
inline

Inserts a value to the flat_multimap. If asserts or exceptions are enabled, emits flat_multimap_full if the flat_multimap_full is already full.

Parameters
positionThe position to insert at.
valueThe value to insert.

◆ insert() [3/3]

template<typename TKey , typename TMapped , typename TKeyCompare = etl::less<TKey>>
template<class TIterator >
void etl::iflat_multimap< TKey, TMapped, TKeyCompare >::insert ( TIterator  first,
TIterator  last 
)
inline

Inserts a range of values to the flat_multimap. If asserts or exceptions are enabled, emits flat_multimap_full if the flat_multimap does not have enough free space.

Parameters
positionThe position to insert at.
firstThe first element to add.
lastThe last + 1 element to add.

◆ lower_bound() [1/2]

template<typename TKey , typename TMapped , typename TKeyCompare = etl::less<TKey>>
iterator etl::iflat_multimap< TKey, TMapped, TKeyCompare >::lower_bound ( const_key_reference  key)
inline

Finds the lower bound of a key

Parameters
keyThe key to search for.
Returns
An iterator.

◆ lower_bound() [2/2]

template<typename TKey , typename TMapped , typename TKeyCompare = etl::less<TKey>>
const_iterator etl::iflat_multimap< TKey, TMapped, TKeyCompare >::lower_bound ( const_key_reference  key) const
inline

Finds the lower bound of a key

Parameters
keyThe key to search for.
Returns
An iterator.

◆ max_size()

template<typename TKey , typename TMapped , typename TKeyCompare = etl::less<TKey>>
size_type etl::iflat_multimap< TKey, TMapped, TKeyCompare >::max_size ( ) const
inline

Returns the maximum possible size of the flat_multiset.

Returns
The maximum size of the flat_multiset.

◆ rbegin() [1/2]

template<typename TKey , typename TMapped , typename TKeyCompare = etl::less<TKey>>
reverse_iterator etl::iflat_multimap< TKey, TMapped, TKeyCompare >::rbegin ( )
inline

Returns an reverse iterator to the reverse beginning of the flat_multimap.

Returns
Iterator to the reverse beginning of the flat_multimap.

◆ rbegin() [2/2]

template<typename TKey , typename TMapped , typename TKeyCompare = etl::less<TKey>>
const_reverse_iterator etl::iflat_multimap< TKey, TMapped, TKeyCompare >::rbegin ( ) const
inline

Returns a const reverse iterator to the reverse beginning of the flat_multimap.

Returns
Const iterator to the reverse beginning of the flat_multimap.

◆ rend() [1/2]

template<typename TKey , typename TMapped , typename TKeyCompare = etl::less<TKey>>
reverse_iterator etl::iflat_multimap< TKey, TMapped, TKeyCompare >::rend ( )
inline

Returns a reverse iterator to the end + 1 of the flat_multimap.

Returns
Reverse iterator to the end + 1 of the flat_multimap.

◆ rend() [2/2]

template<typename TKey , typename TMapped , typename TKeyCompare = etl::less<TKey>>
const_reverse_iterator etl::iflat_multimap< TKey, TMapped, TKeyCompare >::rend ( ) const
inline

Returns a const reverse iterator to the end + 1 of the flat_multimap.

Returns
Const reverse iterator to the end + 1 of the flat_multimap.

◆ size()

template<typename TKey , typename TMapped , typename TKeyCompare = etl::less<TKey>>
size_type etl::iflat_multimap< TKey, TMapped, TKeyCompare >::size ( ) const
inline

Gets the current size of the flat_multiset.

Returns
The current size of the flat_multiset.

◆ upper_bound() [1/2]

template<typename TKey , typename TMapped , typename TKeyCompare = etl::less<TKey>>
iterator etl::iflat_multimap< TKey, TMapped, TKeyCompare >::upper_bound ( const_key_reference  key)
inline

Finds the upper bound of a key

Parameters
keyThe key to search for.
Returns
An iterator.

◆ upper_bound() [2/2]

template<typename TKey , typename TMapped , typename TKeyCompare = etl::less<TKey>>
const_iterator etl::iflat_multimap< TKey, TMapped, TKeyCompare >::upper_bound ( const_key_reference  key) const
inline

Finds the upper bound of a key

Parameters
keyThe key to search for.
Returns
An iterator.

◆ etl::flat_multimap

class etl::flat_multimap
template<typename TKey, typename TValue, const size_t MAX_SIZE_, typename TCompare = etl::less<TKey>>
class etl::flat_multimap< TKey, TValue, MAX_SIZE_, TCompare >

A flat_multimap implementation that uses a fixed size buffer.

Template Parameters
TKeyThe key type.
TValueThe value type.
TCompareThe type to compare keys. Default = etl::less<TKey>
MAX_SIZE_The maximum number of elements that can be stored.

Public Member Functions

 flat_multimap ()
 Constructor.
 
 flat_multimap (const flat_multimap &other)
 Copy constructor.
 
template<typename TIterator >
 flat_multimap (TIterator first, TIterator last)
 
 ~flat_multimap ()
 Destructor.
 
flat_multimapoperator= (const flat_multimap &rhs)
 Assignment operator.
 
- Public Member Functions inherited from etl::iflat_multimap< TKey, TValue, etl::less< TKey > >
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
const_iterator cbegin () const
 
const_iterator cend () const
 
reverse_iterator rbegin ()
 
const_reverse_iterator rbegin () const
 
reverse_iterator rend ()
 
const_reverse_iterator rend () const
 
const_reverse_iterator crbegin () const
 
const_reverse_iterator crend () const
 
void assign (TIterator first, TIterator last)
 
ETL_OR_STD::pair< iterator, bool > insert (const value_type &value)
 
iterator insert (const_iterator, const value_type &value)
 
void insert (TIterator first, TIterator last)
 
ETL_OR_STD::pair< iterator, bool > emplace (const value_type &value)
 Emplaces a value to the map.
 
ETL_OR_STD::pair< iterator, bool > emplace (const key_type &key, const mapped_type &mapped)
 Emplaces a value to the map.
 
ETL_OR_STD::pair< iterator, bool > emplace (const key_type &key, const T1 &value1)
 Emplaces a value to the map.
 
ETL_OR_STD::pair< iterator, bool > emplace (const key_type &key, const T1 &value1, const T2 &value2)
 Emplaces a value to the map.
 
ETL_OR_STD::pair< iterator, bool > emplace (const key_type &key, const T1 &value1, const T2 &value2, const T3 &value3)
 Emplaces a value to the map.
 
ETL_OR_STD::pair< iterator, bool > emplace (const key_type &key, const T1 &value1, const T2 &value2, const T3 &value3, const T4 &value4)
 Emplaces a value to the map.
 
size_t erase (const_key_reference key)
 
iterator erase (iterator i_element)
 
iterator erase (const_iterator i_element)
 
iterator erase (const_iterator first, const_iterator last)
 
void clear ()
 Clears the flat_multimap.
 
iterator find (const_key_reference key)
 
const_iterator find (const_key_reference key) const
 
size_t count (const_key_reference key) const
 
iterator lower_bound (const_key_reference key)
 
const_iterator lower_bound (const_key_reference key) const
 
iterator upper_bound (const_key_reference key)
 
const_iterator upper_bound (const_key_reference key) const
 
ETL_OR_STD::pair< iterator, iterator > equal_range (const_key_reference key)
 
ETL_OR_STD::pair< const_iterator, const_iterator > equal_range (const_key_reference key) const
 
bool contains (const_key_reference key) const
 Check if the map contains the key.
 
iflat_multimapoperator= (const iflat_multimap &rhs)
 Assignment operator.
 
size_type size () const
 
bool empty () const
 
bool full () const
 
size_type capacity () const
 
size_type max_size () const
 
size_t available () const
 
- Public Member Functions inherited from etl::ireference_flat_multimap< TKey, TValue, etl::less< TKey > >
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
const_iterator cbegin () const
 
const_iterator cend () const
 
reverse_iterator rbegin ()
 
const_reverse_iterator rbegin () const
 
reverse_iterator rend ()
 
const_reverse_iterator rend () const
 
const_reverse_iterator crbegin () const
 
const_reverse_iterator crend () const
 
void assign (TIterator first, TIterator last)
 
ETL_OR_STD::pair< iterator, bool > insert (value_type &value)
 
iterator insert (const_iterator, const value_type &value)
 
void insert (TIterator first, TIterator last)
 
size_t erase (key_parameter_t key)
 
iterator erase (iterator i_element)
 
iterator erase (const_iterator i_element)
 
iterator erase (const_iterator first, const_iterator last)
 
void clear ()
 Clears the reference_flat_multimap.
 
iterator find (key_parameter_t key)
 
const_iterator find (key_parameter_t key) const
 
size_t count (key_parameter_t key) const
 
iterator lower_bound (key_parameter_t key)
 
const_iterator lower_bound (key_parameter_t key) const
 
iterator upper_bound (key_parameter_t key)
 
const_iterator upper_bound (key_parameter_t key) const
 
ETL_OR_STD::pair< iterator, iteratorequal_range (key_parameter_t key)
 
ETL_OR_STD::pair< const_iterator, const_iterator > equal_range (key_parameter_t key) const
 
bool contains (const TKey &key) const
 Check if the map contains the key.
 
size_type size () const
 
bool empty () const
 
bool full () const
 
size_type capacity () const
 
size_type max_size () const
 
size_t available () const
 

Static Public Attributes

static ETL_CONSTANT size_t MAX_SIZE = MAX_SIZE_
 

Additional Inherited Members

- Public Types inherited from etl::iflat_multimap< TKey, TValue, etl::less< TKey > >
typedef ETL_OR_STD::pair< const TKey, TValue > value_type
 
typedef TKey key_type
 
typedef TValue mapped_type
 
typedef etl::less< TKey > key_compare
 
typedef value_type & reference
 
typedef const value_type & const_reference
 
typedef value_type * pointer
 
typedef const value_type * const_pointer
 
typedef size_t size_type
 
typedef const key_type & const_key_reference
 
typedef refmap_t::iterator iterator
 
typedef refmap_t::const_iterator const_iterator
 
typedef ETL_OR_STD::reverse_iterator< iterator > reverse_iterator
 
typedef ETL_OR_STD::reverse_iterator< const_iterator > const_reverse_iterator
 
typedef etl::iterator_traits< iterator >::difference_type difference_type
 
- Public Types inherited from etl::ireference_flat_multimap< TKey, TValue, etl::less< TKey > >
typedef ETL_OR_STD::pair< const TKey, TValue > value_type
 
typedef TKey key_type
 
typedef TValue mapped_type
 
typedef etl::less< TKey > key_compare
 
typedef value_type & reference
 
typedef const value_type & const_reference
 
typedef value_type * pointer
 
typedef const value_type * const_pointer
 
typedef size_t size_type
 
typedef ETL_OR_STD::reverse_iterator< iteratorreverse_iterator
 
typedef ETL_OR_STD::reverse_iterator< const_iterator > const_reverse_iterator
 
typedef etl::iterator_traits< iterator >::difference_type difference_type
 
- Protected Types inherited from etl::ireference_flat_multimap< TKey, TValue, etl::less< TKey > >
typedef etl::ivector< value_type * > lookup_t
 
typedef const TKey & key_parameter_t
 
- Protected Member Functions inherited from etl::iflat_multimap< TKey, TValue, etl::less< TKey > >
 iflat_multimap (lookup_t &lookup_, storage_t &storage_)
 Constructor.
 
 ~iflat_multimap ()
 Internal debugging. More...
 
- Protected Member Functions inherited from etl::ireference_flat_multimap< TKey, TValue, etl::less< TKey > >
 ireference_flat_multimap (lookup_t &lookup_)
 Constructor.
 
ETL_OR_STD::pair< iterator, bool > insert_at (iterator i_element, value_type &value)
 
 ~ireference_flat_multimap ()
 Destructor.
 

Constructor & Destructor Documentation

◆ flat_multimap()

template<typename TKey , typename TValue , const size_t MAX_SIZE_, typename TCompare = etl::less<TKey>>
template<typename TIterator >
etl::flat_multimap< TKey, TValue, MAX_SIZE_, TCompare >::flat_multimap ( TIterator  first,
TIterator  last 
)
inline

Constructor, from an iterator range.

Template Parameters
TIteratorThe iterator type.
Parameters
firstThe iterator to the first element.
lastThe iterator to the last element + 1.

Function Documentation

◆ operator!=()

template<typename TKey , typename TMapped , typename TKeyCompare >
bool etl::operator!= ( const etl::iflat_multimap< TKey, TMapped, TKeyCompare > &  lhs,
const etl::iflat_multimap< TKey, TMapped, TKeyCompare > &  rhs 
)

Not equal operator.

Parameters
lhsReference to the first flat_multimap.
rhsReference to the second flat_multimap.
Returns
true if the arrays are not equal, otherwise false

◆ operator==()

template<typename TKey , typename TMapped , typename TKeyCompare >
bool etl::operator== ( const etl::iflat_multimap< TKey, TMapped, TKeyCompare > &  lhs,
const etl::iflat_multimap< TKey, TMapped, TKeyCompare > &  rhs 
)

Equal operator.

Parameters
lhsReference to the first flat_multimap.
rhsReference to the second flat_multimap.
Returns
true if the arrays are equal, otherwise false