Embedded Template Library 1.0
|
Classes | |
class | etl::iflat_multiset< T, TKeyCompare > |
class | etl::flat_multiset< T, MAX_SIZE_, TCompare > |
Functions | |
template<typename T , typename TKeyCompare > | |
bool | etl::operator== (const etl::iflat_multiset< T, TKeyCompare > &lhs, const etl::iflat_multiset< T, TKeyCompare > &rhs) |
template<typename T , typename TKeyCompare > | |
bool | etl::operator!= (const etl::iflat_multiset< T, TKeyCompare > &lhs, const etl::iflat_multiset< T, TKeyCompare > &rhs) |
A flat_multiset with the capacity defined at compile time. Has insertion of O(N) and find of O(logN) Duplicate entries and not allowed.
class etl::iflat_multiset |
The base class for specifically sized flat_multisets. Can be used as a reference type for all flat_multisets containing a specific type.
Public Types | |
typedef T | key_type |
typedef T | value_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 refset_t::iterator | iterator |
typedef refset_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 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_reference value) |
iterator | insert (const_iterator, const_reference value) |
template<class TIterator > | |
void | insert (TIterator first, TIterator last) |
template<typename T1 > | |
ETL_OR_STD::pair< iterator, bool > | emplace (const_reference value) |
Emplaces a value to the set. | |
ETL_OR_STD::pair< iterator, bool > | emplace () |
Emplaces a value to the set. | |
template<typename T1 > | |
ETL_OR_STD::pair< iterator, bool > | emplace (const T1 &value1) |
Emplaces a value to the set. | |
template<typename T1 , typename T2 > | |
ETL_OR_STD::pair< iterator, bool > | emplace (const T1 &value1, const T2 &value2) |
Emplaces a value to the set. | |
template<typename T1 , typename T2 , typename T3 > | |
ETL_OR_STD::pair< iterator, bool > | emplace (const T1 &value1, const T2 &value2, const T3 &value3) |
Emplaces a value to the set. | |
template<typename T1 , typename T2 , typename T3 , typename T4 > | |
ETL_OR_STD::pair< iterator, bool > | emplace (const T1 &value1, const T2 &value2, const T3 &value3, const T4 &value4) |
Emplaces a value to the set. | |
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 flat_multiset. | |
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, iterator > | equal_range (key_parameter_t key) |
ETL_OR_STD::pair< const_iterator, const_iterator > | equal_range (key_parameter_t key) const |
bool | contains (key_parameter_t key) const |
Check if the map contains the key. | |
iflat_multiset & | operator= (const iflat_multiset &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 |
Protected Member Functions | |
iflat_multiset (lookup_t &lookup_, storage_t &storage_) | |
Constructor. | |
~iflat_multiset () | |
Destructor. | |
|
inline |
Assigns values to the flat_multiset. If asserts or exceptions are enabled, emits flat_multiset_full if the flat_multiset does not have enough free space. If asserts or exceptions are enabled, emits flat_multiset_iterator if the iterators are reversed.
first | The iterator to the first element. |
last | The iterator to the last element + 1. |
|
inline |
Returns the remaining capacity.
|
inline |
Returns an iterator to the beginning of the flat_multiset.
|
inline |
Returns a const_iterator to the beginning of the flat_multiset.
|
inline |
Returns the capacity of the flat_multiset.
|
inline |
Returns a const_iterator to the beginning of the flat_multiset.
|
inline |
Returns a const_iterator to the end of the flat_multiset.
|
inline |
Counts an element.
key | The key to search for. |
|
inline |
Returns a const reverse iterator to the reverse beginning of the flat_multiset.
|
inline |
Returns a const reverse iterator to the end + 1 of the flat_multiset.
|
inline |
Emplaces a value to the set.
Emplaces a value to the set.
|
inline |
Checks the 'empty' state of the flat_multiset.
|
inline |
Returns an iterator to the end of the flat_multiset.
|
inline |
Returns a const_iterator to the end of the flat_multiset.
|
inline |
Finds the range of equal elements of a key
key | The key to search for. |
|
inline |
Finds the range of equal elements of a key
key | The key to search for. |
|
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.
first | Iterator to the first element. |
last | Iterator to the last element. |
|
inline |
Erases an element.
i_element | Iterator to the element. |
|
inline |
Erases an element.
i_element | Iterator to the element. |
|
inline |
Erases an element.
key | The key to erase. |
|
inline |
Finds an element.
key | The key to search for. |
|
inline |
Finds an element.
key | The key to search for. |
|
inline |
Checks the 'full' state of the flat_multiset.
|
inline |
Inserts a value to the flat_multiset. If asserts or exceptions are enabled, emits flat_multiset_full if the flat_multiset is already full.
position | The position to insert at. |
value | The value to insert. |
|
inline |
Inserts a value to the flat_multiset. If asserts or exceptions are enabled, emits flat_multiset_full if the flat_multiset is already full.
value | The value to insert. |
|
inline |
Inserts a range of values to the flat_multiset. If asserts or exceptions are enabled, emits flat_multiset_full if the flat_multiset does not have enough free space.
position | The position to insert at. |
first | The first element to add. |
last | The last + 1 element to add. |
|
inline |
Finds the lower bound of a key
key | The key to search for. |
|
inline |
Finds the lower bound of a key
key | The key to search for. |
|
inline |
Returns the maximum possible size of the flat_multiset.
|
inline |
Returns an reverse iterator to the reverse beginning of the flat_multiset.
|
inline |
Returns a const reverse iterator to the reverse beginning of the flat_multiset.
|
inline |
Returns a reverse iterator to the end + 1 of the flat_multiset.
|
inline |
Returns a const reverse iterator to the end + 1 of the flat_multiset.
|
inline |
Gets the current size of the flat_multiset.
|
inline |
Finds the upper bound of a key
key | The key to search for. |
|
inline |
Finds the upper bound of a key
key | The key to search for. |
class etl::flat_multiset |
A flat_multiset implementation that uses a fixed size buffer.
T | The value type. |
TCompare | The type to compare keys. Default = etl::less<T> |
MAX_SIZE_ | The maximum number of elements that can be stored. |
Public Member Functions | |
flat_multiset () | |
Constructor. | |
flat_multiset (const flat_multiset &other) | |
Copy constructor. | |
template<typename TIterator > | |
flat_multiset (TIterator first, TIterator last) | |
~flat_multiset () | |
Destructor. | |
flat_multiset & | operator= (const flat_multiset &rhs) |
Assignment operator. | |
![]() | |
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_reference value) |
iterator | insert (const_iterator, const_reference value) |
template<class TIterator > | |
void | insert (TIterator first, TIterator last) |
template<typename T1 > | |
ETL_OR_STD::pair< iterator, bool > | emplace (const_reference value) |
Emplaces a value to the set. | |
ETL_OR_STD::pair< iterator, bool > | emplace () |
Emplaces a value to the set. | |
template<typename T1 > | |
ETL_OR_STD::pair< iterator, bool > | emplace (const T1 &value1) |
Emplaces a value to the set. | |
template<typename T1 , typename T2 > | |
ETL_OR_STD::pair< iterator, bool > | emplace (const T1 &value1, const T2 &value2) |
Emplaces a value to the set. | |
template<typename T1 , typename T2 , typename T3 > | |
ETL_OR_STD::pair< iterator, bool > | emplace (const T1 &value1, const T2 &value2, const T3 &value3) |
Emplaces a value to the set. | |
template<typename T1 , typename T2 , typename T3 , typename T4 > | |
ETL_OR_STD::pair< iterator, bool > | emplace (const T1 &value1, const T2 &value2, const T3 &value3, const T4 &value4) |
Emplaces a value to the set. | |
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 flat_multiset. | |
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, iterator > | equal_range (key_parameter_t key) |
ETL_OR_STD::pair< const_iterator, const_iterator > | equal_range (key_parameter_t key) const |
bool | contains (key_parameter_t key) const |
Check if the map contains the key. | |
iflat_multiset & | operator= (const iflat_multiset &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 |
Static Public Attributes | |
static ETL_CONSTANT size_t | MAX_SIZE = MAX_SIZE_ |
Additional Inherited Members | |
![]() | |
typedef T | key_type |
typedef T | value_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 refset_t::iterator | iterator |
typedef refset_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 |
![]() | |
iflat_multiset (lookup_t &lookup_, storage_t &storage_) | |
Constructor. | |
~iflat_multiset () | |
Destructor. | |
bool etl::operator!= | ( | const etl::iflat_multiset< T, TKeyCompare > & | lhs, |
const etl::iflat_multiset< T, TKeyCompare > & | rhs | ||
) |
Not equal operator.
lhs | Reference to the first flat_multiset. |
rhs | Reference to the second flat_multiset. |
bool etl::operator== | ( | const etl::iflat_multiset< T, TKeyCompare > & | lhs, |
const etl::iflat_multiset< T, TKeyCompare > & | rhs | ||
) |
Equal operator.
lhs | Reference to the first flat_multiset. |
rhs | Reference to the second flat_multiset. |