Embedded Template Library 1.0
Loading...
Searching...
No Matches
etl::iconst_multiset< TKey, TKeyCompare > Class Template Reference

Public Types

using key_type = TKey
using value_type = TKey
using key_compare = TKeyCompare
using value_compare = TKeyCompare
using const_reference = const value_type&
using const_pointer = const value_type*
using const_iterator = const value_type*
using size_type = size_t

Public Member Functions

ETL_CONSTEXPR14 bool is_valid () const ETL_NOEXCEPT
ETL_CONSTEXPR14 const_iterator begin () const ETL_NOEXCEPT
 Gets the beginning of the multiset.
ETL_CONSTEXPR14 const_iterator cbegin () const ETL_NOEXCEPT
 Gets the beginning of the multiset.
ETL_CONSTEXPR14 const_iterator end () const ETL_NOEXCEPT
 Gets the end of the multiset.
ETL_CONSTEXPR14 const_iterator cend () const ETL_NOEXCEPT
 Gets the end of the multiset.
ETL_CONSTEXPR14 const_pointer data () const ETL_NOEXCEPT
 Gets the beginning of the multiset.
ETL_CONSTEXPR14 const_iterator find (const key_type &key) const ETL_NOEXCEPT
 Gets a const_iterator to the value at the key index.
template<typename K, typename KC = TKeyCompare, etl::enable_if_t< comparator_is_transparent< KC >::value, int > = 0>
ETL_CONSTEXPR14 const_iterator find (const K &key) const ETL_NOEXCEPT
 Gets a const_iterator to the value at the key index. Enabled if the comparator is transparent.
ETL_CONSTEXPR14 bool contains (const key_type &key) const ETL_NOEXCEPT
 Checks if the multiset contains an element with key.
template<typename K, typename KC = TKeyCompare, etl::enable_if_t< comparator_is_transparent< KC >::value, int > = 0>
ETL_CONSTEXPR14 bool contains (const K &key) const ETL_NOEXCEPT
 Checks if the multiset contains an element with key. Enabled if the comparator is transparent.
ETL_CONSTEXPR14 size_type count (const key_type &key) const ETL_NOEXCEPT
 Counts the numbeer elements with key.
template<typename K, typename KC = TKeyCompare, etl::enable_if_t< comparator_is_transparent< KC >::value, int > = 0>
ETL_CONSTEXPR14 size_type count (const K &key) const ETL_NOEXCEPT
 Counts the numbeer elements with key. Enabled if the comparator is transparent.
ETL_CONSTEXPR14 ETL_OR_STD::pair< const_iterator, const_iterator > equal_range (const key_type &key) const ETL_NOEXCEPT
 Returns a range containing all elements with the key. The range is defined by a pair of two iterators, one to the first element that is not less than the key and second to the first element greater than the key.
template<typename K, typename KC = TKeyCompare, etl::enable_if_t< comparator_is_transparent< KC >::value, int > = 0>
ETL_CONSTEXPR14 ETL_OR_STD::pair< const_iterator, const_iterator > equal_range (const K &key) const ETL_NOEXCEPT
 Returns a range containing all elements with the key. The range is defined by a pair of two iterators, one to the first element that is not less than the key and second to the first element greater than the key. Enabled if the comparator is transparent.
ETL_CONSTEXPR14 const_iterator lower_bound (const key_type &key) const ETL_NOEXCEPT
 Returns a const_iterator to the first element that is not less than the key. Returns a const_iterator to the first element that is not less than the key.
template<typename K, typename KC = TKeyCompare, etl::enable_if_t< comparator_is_transparent< KC >::value, int > = 0>
ETL_CONSTEXPR14 const_iterator lower_bound (const K &key) const ETL_NOEXCEPT
 Returns a const_iterator to the first element that is not less than the key. Returns a const_iterator to the first element that is not less than the key. Enabled if the comparator is transparent.
ETL_CONSTEXPR14 const_iterator upper_bound (const key_type &key) const ETL_NOEXCEPT
 Returns a const_iterator to the first element that is greater than the key. Returns a const_iterator to the first element that is greater than the key.
template<typename K, typename KC = TKeyCompare, etl::enable_if_t< comparator_is_transparent< KC >::value, int > = 0>
ETL_CONSTEXPR14 const_iterator upper_bound (const K &key) const ETL_NOEXCEPT
 Returns a const_iterator to the first element that is greater than the key. Returns a const_iterator to the first element that is greater than the key. Enabled if the comparator is transparent.
ETL_CONSTEXPR14 size_type empty () const ETL_NOEXCEPT
ETL_CONSTEXPR14 size_type full () const ETL_NOEXCEPT
ETL_CONSTEXPR14 size_type size () const ETL_NOEXCEPT
ETL_CONSTEXPR14 size_type max_size () const ETL_NOEXCEPT
ETL_CONSTEXPR14 size_type capacity () const ETL_NOEXCEPT
ETL_CONSTEXPR14 key_compare key_comp () const ETL_NOEXCEPT
ETL_CONSTEXPR14 value_compare value_comp () const ETL_NOEXCEPT

Protected Member Functions

template<typename... TElements>
ETL_CONSTEXPR14 iconst_multiset (const value_type *element_list_, size_type size_, size_type max_elements_) ETL_NOEXCEPT
 Constructor.

Member Function Documentation

◆ begin()

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

Gets the beginning of the multiset.

Returns
const_iterator to the beginning of the multiset.

◆ capacity()

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

Gets the capacity of the multiset. This is always equal to max_size().

Returns
The capacity of the multiset.

◆ cbegin()

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

Gets the beginning of the multiset.

Returns
const_iterator to the beginning of the multiset.

◆ cend()

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

Gets the end of the multiset.

Returns
const_iterator to the end of the multiset.

◆ contains() [1/2]

template<typename TKey, typename TKeyCompare = etl::less<TKey>>
template<typename K, typename KC = TKeyCompare, etl::enable_if_t< comparator_is_transparent< KC >::value, int > = 0>
ETL_CONSTEXPR14 bool etl::iconst_multiset< TKey, TKeyCompare >::contains ( const K & key) const
inline

Checks if the multiset contains an element with key. Enabled if the comparator is transparent.

Parameters
keyThe key of the element to check.
Returns
true if the multiset contains an element with key.

◆ contains() [2/2]

template<typename TKey, typename TKeyCompare = etl::less<TKey>>
ETL_CONSTEXPR14 bool etl::iconst_multiset< TKey, TKeyCompare >::contains ( const key_type & key) const
inline

Checks if the multiset contains an element with key.

Parameters
keyThe key of the element to check.
Returns
true if the multiset contains an element with key.

◆ count() [1/2]

template<typename TKey, typename TKeyCompare = etl::less<TKey>>
template<typename K, typename KC = TKeyCompare, etl::enable_if_t< comparator_is_transparent< KC >::value, int > = 0>
ETL_CONSTEXPR14 size_type etl::iconst_multiset< TKey, TKeyCompare >::count ( const K & key) const
inline

Counts the numbeer elements with key. Enabled if the comparator is transparent.

Parameters
keyThe key of the element to count.
Returns
0 or 1

◆ count() [2/2]

template<typename TKey, typename TKeyCompare = etl::less<TKey>>
ETL_CONSTEXPR14 size_type etl::iconst_multiset< TKey, TKeyCompare >::count ( const key_type & key) const
inline

Counts the numbeer elements with key.

Parameters
keyThe key of the element to count.
Returns
0 or 1

◆ data()

template<typename TKey, typename TKeyCompare = etl::less<TKey>>
ETL_CONSTEXPR14 const_pointer etl::iconst_multiset< TKey, TKeyCompare >::data ( ) const
inline

Gets the beginning of the multiset.

Returns
const_pointer to the beginning of the multiset.

◆ empty()

template<typename TKey, typename TKeyCompare = etl::less<TKey>>
ETL_CONSTEXPR14 size_type etl::iconst_multiset< TKey, TKeyCompare >::empty ( ) const
inline

Checks if the multiset is empty.

Returns
true if the multiset is empty.

◆ end()

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

Gets the end of the multiset.

Returns
const_iterator to the end of the multiset.

◆ equal_range() [1/2]

template<typename TKey, typename TKeyCompare = etl::less<TKey>>
template<typename K, typename KC = TKeyCompare, etl::enable_if_t< comparator_is_transparent< KC >::value, int > = 0>
ETL_CONSTEXPR14 ETL_OR_STD::pair< const_iterator, const_iterator > etl::iconst_multiset< TKey, TKeyCompare >::equal_range ( const K & key) const
inline

Returns a range containing all elements with the key. The range is defined by a pair of two iterators, one to the first element that is not less than the key and second to the first element greater than the key. Enabled if the comparator is transparent.

Parameters
keyThe key of the element
Returns
etl::pair or std::pair containing a pair of iterators.

◆ equal_range() [2/2]

template<typename TKey, typename TKeyCompare = etl::less<TKey>>
ETL_CONSTEXPR14 ETL_OR_STD::pair< const_iterator, const_iterator > etl::iconst_multiset< TKey, TKeyCompare >::equal_range ( const key_type & key) const
inline

Returns a range containing all elements with the key. The range is defined by a pair of two iterators, one to the first element that is not less than the key and second to the first element greater than the key.

Parameters
keyThe key of the element
Returns
etl::pair or std::pair containing a pair of iterators.

◆ find() [1/2]

template<typename TKey, typename TKeyCompare = etl::less<TKey>>
template<typename K, typename KC = TKeyCompare, etl::enable_if_t< comparator_is_transparent< KC >::value, int > = 0>
ETL_CONSTEXPR14 const_iterator etl::iconst_multiset< TKey, TKeyCompare >::find ( const K & key) const
inline

Gets a const_iterator to the value at the key index. Enabled if the comparator is transparent.

Parameters
keyThe key of the element to find.
Returns
A const_iterator to the value at the index, or end() if not found.

◆ find() [2/2]

template<typename TKey, typename TKeyCompare = etl::less<TKey>>
ETL_CONSTEXPR14 const_iterator etl::iconst_multiset< TKey, TKeyCompare >::find ( const key_type & key) const
inline

Gets a const_iterator to the value at the key index.

Parameters
keyThe key of the element to find.
Returns
A const_iterator to the value at the index, or end() if not found.

◆ full()

template<typename TKey, typename TKeyCompare = etl::less<TKey>>
ETL_CONSTEXPR14 size_type etl::iconst_multiset< TKey, TKeyCompare >::full ( ) const
inline

Checks if the multiset is full.

Returns
true if the multiset is full.

◆ is_valid()

template<typename TKey, typename TKeyCompare = etl::less<TKey>>
ETL_CONSTEXPR14 bool etl::iconst_multiset< TKey, TKeyCompare >::is_valid ( ) const
inline

Check that the elements are valid for a multiset. The elements must be sorted.

Returns
true if the elements are valid for the multiset.

◆ key_comp()

template<typename TKey, typename TKeyCompare = etl::less<TKey>>
ETL_CONSTEXPR14 key_compare etl::iconst_multiset< TKey, TKeyCompare >::key_comp ( ) const
inline

How to compare two key elements.

Returns
An instance of the key_compare type.

◆ lower_bound() [1/2]

template<typename TKey, typename TKeyCompare = etl::less<TKey>>
template<typename K, typename KC = TKeyCompare, etl::enable_if_t< comparator_is_transparent< KC >::value, int > = 0>
ETL_CONSTEXPR14 const_iterator etl::iconst_multiset< TKey, TKeyCompare >::lower_bound ( const K & key) const
inline

Returns a const_iterator to the first element that is not less than the key. Returns a const_iterator to the first element that is not less than the key. Enabled if the comparator is transparent.

Parameters
keyThe key of the element
Returns
const_iterator to the element or end()

◆ lower_bound() [2/2]

template<typename TKey, typename TKeyCompare = etl::less<TKey>>
ETL_CONSTEXPR14 const_iterator etl::iconst_multiset< TKey, TKeyCompare >::lower_bound ( const key_type & key) const
inline

Returns a const_iterator to the first element that is not less than the key. Returns a const_iterator to the first element that is not less than the key.

Parameters
keyThe key of the element
Returns
const_iterator to the element or end()

◆ max_size()

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

Gets the maximum size of the multiset.

Returns
The maximum size of the multiset.

◆ size()

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

Gets the size of the multiset.

Returns
The size of the multiset.

◆ upper_bound() [1/2]

template<typename TKey, typename TKeyCompare = etl::less<TKey>>
template<typename K, typename KC = TKeyCompare, etl::enable_if_t< comparator_is_transparent< KC >::value, int > = 0>
ETL_CONSTEXPR14 const_iterator etl::iconst_multiset< TKey, TKeyCompare >::upper_bound ( const K & key) const
inline

Returns a const_iterator to the first element that is greater than the key. Returns a const_iterator to the first element that is greater than the key. Enabled if the comparator is transparent.

Parameters
keyThe key of the element
Returns
const_iterator to the element or end()

◆ upper_bound() [2/2]

template<typename TKey, typename TKeyCompare = etl::less<TKey>>
ETL_CONSTEXPR14 const_iterator etl::iconst_multiset< TKey, TKeyCompare >::upper_bound ( const key_type & key) const
inline

Returns a const_iterator to the first element that is greater than the key. Returns a const_iterator to the first element that is greater than the key.

Parameters
keyThe key of the element
Returns
const_iterator to the element or end()

◆ value_comp()

template<typename TKey, typename TKeyCompare = etl::less<TKey>>
ETL_CONSTEXPR14 value_compare etl::iconst_multiset< TKey, TKeyCompare >::value_comp ( ) const
inline

How to compare two value elements.

Returns
An instance of the value_compare type.

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