Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
reference_flat_multimap< TKey, TValue, MAX_SIZE_, TCompare > Class Template Reference
A reference_flat_multimap implementation that uses a fixed size buffer. More...
#include <reference_flat_multimap.h>
Inherits ireference_flat_multimap< TKey, TValue, TCompare >.
Public Member Functions | |
reference_flat_multimap () | |
Constructor. | |
reference_flat_multimap (const reference_flat_multimap &other) | |
Copy constructor. | |
template<typename TIterator > | |
reference_flat_multimap (TIterator first, TIterator last) | |
Constructor, from an iterator range. | |
~reference_flat_multimap () | |
Destructor. | |
iterator | begin () |
Returns an iterator to the beginning of the reference_flat_multimap. | |
const_iterator | begin () const |
Returns a const_iterator to the beginning of the reference_flat_multimap. | |
iterator | end () |
Returns an iterator to the end of the reference_flat_multimap. | |
const_iterator | end () const |
Returns a const_iterator to the end of the reference_flat_multimap. | |
const_iterator | cbegin () const |
Returns a const_iterator to the beginning of the reference_flat_multimap. | |
const_iterator | cend () const |
Returns a const_iterator to the end of the reference_flat_multimap. | |
reverse_iterator | rbegin () |
Returns an reverse iterator to the reverse beginning of the reference_flat_multimap. | |
const_reverse_iterator | rbegin () const |
Returns a const reverse iterator to the reverse beginning of the reference_flat_multimap. | |
reverse_iterator | rend () |
Returns a reverse iterator to the end + 1 of the reference_flat_multimap. | |
const_reverse_iterator | rend () const |
Returns a const reverse iterator to the end + 1 of the reference_flat_multimap. | |
const_reverse_iterator | crbegin () const |
Returns a const reverse iterator to the reverse beginning of the reference_flat_multimap. | |
const_reverse_iterator | crend () const |
Returns a const reverse iterator to the end + 1 of the reference_flat_multimap. | |
void | assign (TIterator first, TIterator last) |
Assigns values to the reference_flat_multimap. | |
std::pair< iterator, bool > | insert (value_type &value) |
Inserts a value to the reference_flat_multimap. | |
iterator | insert (iterator position, const value_type &value) |
Inserts a value to the flast_multi. | |
void | insert (TIterator first, TIterator last) |
Inserts a range of values to the reference_flat_multimap. | |
size_t | erase (key_parameter_t key) |
Erases an element. | |
void | erase (iterator i_element) |
Erases an element. | |
void | erase (iterator first, iterator last) |
Erases a range of elements. | |
void | clear () |
Clears the reference_flat_multimap. | |
iterator | find (key_parameter_t key) |
Finds an element. | |
const_iterator | find (key_parameter_t key) const |
Finds an element. | |
size_t | count (key_parameter_t key) const |
Counts an element. | |
iterator | lower_bound (key_parameter_t key) |
Finds the lower bound of a key. | |
const_iterator | lower_bound (key_parameter_t key) const |
Finds the lower bound of a key. | |
iterator | upper_bound (key_parameter_t key) |
Finds the upper bound of a key. | |
const_iterator | upper_bound (key_parameter_t key) const |
Finds the upper bound of a key. | |
std::pair< iterator, iterator > | equal_range (key_parameter_t key) |
Finds the range of equal elements of a key. | |
std::pair< const_iterator, const_iterator > | equal_range (key_parameter_t key) const |
Finds the range of equal elements of a key. | |
size_type | size () const |
Gets the current size of the flat_multiset. | |
bool | empty () const |
Checks the 'empty' state of the flat_multiset. | |
bool | full () const |
Checks the 'full' state of the flat_multiset. | |
size_type | capacity () const |
Returns the capacity of the flat_multiset. | |
size_type | max_size () const |
Returns the maximum possible size of the flat_multiset. | |
size_t | available () const |
Returns the remaining capacity. | |
Protected Member Functions | |
std::pair< iterator, bool > | insert_at (iterator i_element, value_type &value) |
Inserts a value to the reference_flat_multimap. |
Detailed Description
template<typename TKey, typename TValue, const size_t MAX_SIZE_, typename TCompare = std::less<TKey>>
class etl::reference_flat_multimap< TKey, TValue, MAX_SIZE_, TCompare >
A reference_flat_multimap implementation that uses a fixed size buffer.
- Template Parameters:
-
TKey The key type. TValue The value type. TCompare The type to compare keys. Default = std::less<TKey> MAX_SIZE_ The maximum number of elements that can be stored.
Definition at line 807 of file reference_flat_multimap.h.
Constructor & Destructor Documentation
Constructor.
Definition at line 816 of file reference_flat_multimap.h.
reference_flat_multimap | ( | const reference_flat_multimap< TKey, TValue, MAX_SIZE_, TCompare > & | other ) |
Copy constructor.
Definition at line 824 of file reference_flat_multimap.h.
reference_flat_multimap | ( | TIterator | first, |
TIterator | last | ||
) |
Constructor, from an iterator range.
- Template Parameters:
-
TIterator The iterator type.
- Parameters:
-
first The iterator to the first element. last The iterator to the last element + 1.
Definition at line 837 of file reference_flat_multimap.h.
Destructor.
Definition at line 846 of file reference_flat_multimap.h.
Member Function Documentation
void assign | ( | TIterator | first, |
TIterator | last | ||
) | [inherited] |
Assigns values to the reference_flat_multimap.
If asserts or exceptions are enabled, emits reference_flat_multimap_full if the reference_flat_multimap does not have enough free space. If asserts or exceptions are enabled, emits reference_flat_multimap_iterator if the iterators are reversed.
- Parameters:
-
first The iterator to the first element. last The iterator to the last element + 1.
Reimplemented in iflat_multimap< TKey, TValue, TCompare >.
Definition at line 440 of file reference_flat_multimap.h.
size_t available | ( | ) | const [inherited] |
Returns the remaining capacity.
- Returns:
- The remaining capacity.
Reimplemented in iflat_multimap< TKey, TValue, TCompare >.
Definition at line 721 of file reference_flat_multimap.h.
const_iterator begin | ( | ) | const [inherited] |
Returns a const_iterator to the beginning of the reference_flat_multimap.
- Returns:
- A const iterator to the beginning of the reference_flat_multimap.
Reimplemented in iflat_multimap< TKey, TValue, TCompare >.
Definition at line 337 of file reference_flat_multimap.h.
iterator begin | ( | ) | [inherited] |
Returns an iterator to the beginning of the reference_flat_multimap.
- Returns:
- An iterator to the beginning of the reference_flat_multimap.
Reimplemented in iflat_multimap< TKey, TValue, TCompare >.
Definition at line 328 of file reference_flat_multimap.h.
size_type capacity | ( | ) | const [inherited] |
Returns the capacity of the flat_multiset.
- Returns:
- The capacity of the flat_multiset.
Reimplemented in iflat_multimap< TKey, TValue, TCompare >.
Definition at line 703 of file reference_flat_multimap.h.
const_iterator cbegin | ( | ) | const [inherited] |
Returns a const_iterator to the beginning of the reference_flat_multimap.
- Returns:
- A const iterator to the beginning of the reference_flat_multimap.
Reimplemented in iflat_multimap< TKey, TValue, TCompare >.
Definition at line 364 of file reference_flat_multimap.h.
const_iterator cend | ( | ) | const [inherited] |
Returns a const_iterator to the end of the reference_flat_multimap.
- Returns:
- A const iterator to the end of the reference_flat_multimap.
Reimplemented in iflat_multimap< TKey, TValue, TCompare >.
Definition at line 373 of file reference_flat_multimap.h.
void clear | ( | ) | [inherited] |
Clears the reference_flat_multimap.
Reimplemented in iflat_multimap< TKey, TValue, TCompare >.
Definition at line 543 of file reference_flat_multimap.h.
size_t count | ( | key_parameter_t | key ) | const [inherited] |
Counts an element.
- Parameters:
-
key The key to search for.
- Returns:
- 1 if the key exists, otherwise 0.
Definition at line 601 of file reference_flat_multimap.h.
const_reverse_iterator crbegin | ( | ) | const [inherited] |
Returns a const reverse iterator to the reverse beginning of the reference_flat_multimap.
- Returns:
- Const reverse iterator to the reverse beginning of the reference_flat_multimap.
Reimplemented in iflat_multimap< TKey, TValue, TCompare >.
Definition at line 418 of file reference_flat_multimap.h.
const_reverse_iterator crend | ( | ) | const [inherited] |
Returns a const reverse iterator to the end + 1 of the reference_flat_multimap.
- Returns:
- Const reverse iterator to the end + 1 of the reference_flat_multimap.
Reimplemented in iflat_multimap< TKey, TValue, TCompare >.
Definition at line 427 of file reference_flat_multimap.h.
bool empty | ( | ) | const [inherited] |
Checks the 'empty' state of the flat_multiset.
- Returns:
- true if empty.
Reimplemented in iflat_multimap< TKey, TValue, TCompare >.
Definition at line 685 of file reference_flat_multimap.h.
const_iterator end | ( | ) | const [inherited] |
Returns a const_iterator to the end of the reference_flat_multimap.
- Returns:
- A const iterator to the end of the reference_flat_multimap.
Reimplemented in iflat_multimap< TKey, TValue, TCompare >.
Definition at line 355 of file reference_flat_multimap.h.
iterator end | ( | ) | [inherited] |
Returns an iterator to the end of the reference_flat_multimap.
- Returns:
- An iterator to the end of the reference_flat_multimap.
Reimplemented in iflat_multimap< TKey, TValue, TCompare >.
Definition at line 346 of file reference_flat_multimap.h.
std::pair<const_iterator, const_iterator> equal_range | ( | key_parameter_t | key ) | const [inherited] |
Finds the range of equal elements of a key.
- Parameters:
-
key The key to search for.
- Returns:
- An iterator pair.
Definition at line 665 of file reference_flat_multimap.h.
std::pair<iterator, iterator> equal_range | ( | key_parameter_t | key ) | [inherited] |
Finds the range of equal elements of a key.
- Parameters:
-
key The key to search for.
- Returns:
- An iterator pair.
Definition at line 653 of file reference_flat_multimap.h.
size_t erase | ( | key_parameter_t | key ) | [inherited] |
Erases an element.
- Parameters:
-
key The key to erase.
- Returns:
- The number of elements erased. 0 or 1.
Definition at line 503 of file reference_flat_multimap.h.
void erase | ( | iterator | i_element ) | [inherited] |
Erases an element.
- Parameters:
-
i_element Iterator to the element.
Definition at line 523 of file reference_flat_multimap.h.
void erase | ( | iterator | first, |
iterator | last | ||
) | [inherited] |
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:
-
first Iterator to the first element. last Iterator to the last element.
Definition at line 535 of file reference_flat_multimap.h.
iterator find | ( | key_parameter_t | key ) | [inherited] |
Finds an element.
- Parameters:
-
key The key to search for.
- Returns:
- An iterator pointing to the element or end() if not found.
Definition at line 553 of file reference_flat_multimap.h.
const_iterator find | ( | key_parameter_t | key ) | const [inherited] |
Finds an element.
- Parameters:
-
key The key to search for.
- Returns:
- An iterator pointing to the element or end() if not found.
Definition at line 577 of file reference_flat_multimap.h.
bool full | ( | ) | const [inherited] |
Checks the 'full' state of the flat_multiset.
- Returns:
- true if full.
Reimplemented in iflat_multimap< TKey, TValue, TCompare >.
Definition at line 694 of file reference_flat_multimap.h.
void insert | ( | TIterator | first, |
TIterator | last | ||
) | [inherited] |
Inserts a range of values to the reference_flat_multimap.
If asserts or exceptions are enabled, emits reference_flat_multimap_full if the reference_flat_multimap does not have enough free space.
- Parameters:
-
position The position to insert at. first The first element to add. last The last + 1 element to add.
Reimplemented in iflat_multimap< TKey, TValue, TCompare >.
Definition at line 490 of file reference_flat_multimap.h.
std::pair<iterator, bool> insert | ( | value_type & | value ) | [inherited] |
Inserts a value to the reference_flat_multimap.
If asserts or exceptions are enabled, emits reference_flat_multimap_full if the reference_flat_multimap is already full.
- Parameters:
-
value The value to insert.
Definition at line 460 of file reference_flat_multimap.h.
iterator insert | ( | iterator | position, |
const value_type & | value | ||
) | [inherited] |
Inserts a value to the flast_multi.
If asserts or exceptions are enabled, emits flat_map_full if the flat_map is already full.
- Parameters:
-
position The position to insert at. value The value to insert.
Definition at line 477 of file reference_flat_multimap.h.
std::pair<iterator, bool> insert_at | ( | iterator | i_element, |
value_type & | value | ||
) | [protected, inherited] |
Inserts a value to the reference_flat_multimap.
- Parameters:
-
i_element The place to insert. value The value to insert.
Definition at line 741 of file reference_flat_multimap.h.
const_iterator lower_bound | ( | key_parameter_t | key ) | const [inherited] |
Finds the lower bound of a key.
- Parameters:
-
key The key to search for.
- Returns:
- An iterator.
Definition at line 623 of file reference_flat_multimap.h.
iterator lower_bound | ( | key_parameter_t | key ) | [inherited] |
Finds the lower bound of a key.
- Parameters:
-
key The key to search for.
- Returns:
- An iterator.
Definition at line 613 of file reference_flat_multimap.h.
size_type max_size | ( | ) | const [inherited] |
Returns the maximum possible size of the flat_multiset.
- Returns:
- The maximum size of the flat_multiset.
Reimplemented in iflat_multimap< TKey, TValue, TCompare >.
Definition at line 712 of file reference_flat_multimap.h.
reverse_iterator rbegin | ( | ) | [inherited] |
Returns an reverse iterator to the reverse beginning of the reference_flat_multimap.
- Returns:
- Iterator to the reverse beginning of the reference_flat_multimap.
Reimplemented in iflat_multimap< TKey, TValue, TCompare >.
Definition at line 382 of file reference_flat_multimap.h.
const_reverse_iterator rbegin | ( | ) | const [inherited] |
Returns a const reverse iterator to the reverse beginning of the reference_flat_multimap.
- Returns:
- Const iterator to the reverse beginning of the reference_flat_multimap.
Reimplemented in iflat_multimap< TKey, TValue, TCompare >.
Definition at line 391 of file reference_flat_multimap.h.
const_reverse_iterator rend | ( | ) | const [inherited] |
Returns a const reverse iterator to the end + 1 of the reference_flat_multimap.
- Returns:
- Const reverse iterator to the end + 1 of the reference_flat_multimap.
Reimplemented in iflat_multimap< TKey, TValue, TCompare >.
Definition at line 409 of file reference_flat_multimap.h.
reverse_iterator rend | ( | ) | [inherited] |
Returns a reverse iterator to the end + 1 of the reference_flat_multimap.
- Returns:
- Reverse iterator to the end + 1 of the reference_flat_multimap.
Reimplemented in iflat_multimap< TKey, TValue, TCompare >.
Definition at line 400 of file reference_flat_multimap.h.
size_type size | ( | ) | const [inherited] |
Gets the current size of the flat_multiset.
- Returns:
- The current size of the flat_multiset.
Reimplemented in iflat_multimap< TKey, TValue, TCompare >.
Definition at line 676 of file reference_flat_multimap.h.
const_iterator upper_bound | ( | key_parameter_t | key ) | const [inherited] |
Finds the upper bound of a key.
- Parameters:
-
key The key to search for.
- Returns:
- An iterator.
Definition at line 643 of file reference_flat_multimap.h.
iterator upper_bound | ( | key_parameter_t | key ) | [inherited] |
Finds the upper bound of a key.
- Parameters:
-
key The key to search for.
- Returns:
- An iterator.
Definition at line 633 of file reference_flat_multimap.h.
Generated on Tue Jul 12 2022 14:05:53 by
