Embedded Template Library 1.0
Loading...
Searching...
No Matches
map

Classes

class  etl::map_exception
 
class  etl::map_full
 
class  etl::map_out_of_bounds
 
class  etl::map_iterator
 
class  etl::map_base
 
class  etl::imap< TKey, TMapped, TKeyCompare >
 
class  etl::multimap_exception
 
class  etl::multimap_full
 
class  etl::multimap_out_of_bounds
 
class  etl::multimap_iterator
 
class  etl::multimap_base
 
class  etl::imultimap< TKey, TMapped, TKeyCompare >
 

Detailed Description

A map with the capacity defined at compile time.


Class Documentation

◆ etl::map_exception

class etl::map_exception

Exception for the map.

Public Member Functions

 map_exception (string_type reason_, string_type file_name_, numeric_type line_number_)
 
- Public Member Functions inherited from etl::exception
ETL_CONSTEXPR exception (string_type reason_, string_type, numeric_type line_)
 Constructor.
 
ETL_CONSTEXPR string_type what () const
 
ETL_CONSTEXPR string_type file_name () const
 
ETL_CONSTEXPR numeric_type line_number () const
 

Additional Inherited Members

- Public Types inherited from etl::exception
typedef const charstring_type
 
typedef int numeric_type
 

◆ etl::map_full

class etl::map_full

Full exception for the map.

Public Member Functions

 map_full (string_type file_name_, numeric_type line_number_)
 
- Public Member Functions inherited from etl::map_exception
 map_exception (string_type reason_, string_type file_name_, numeric_type line_number_)
 
- Public Member Functions inherited from etl::exception
ETL_CONSTEXPR exception (string_type reason_, string_type, numeric_type line_)
 Constructor.
 
ETL_CONSTEXPR string_type what () const
 
ETL_CONSTEXPR string_type file_name () const
 
ETL_CONSTEXPR numeric_type line_number () const
 

Additional Inherited Members

- Public Types inherited from etl::exception
typedef const charstring_type
 
typedef int numeric_type
 

◆ etl::map_out_of_bounds

class etl::map_out_of_bounds

Map out of bounds exception.

Public Member Functions

 map_out_of_bounds (string_type file_name_, numeric_type line_number_)
 
- Public Member Functions inherited from etl::map_exception
 map_exception (string_type reason_, string_type file_name_, numeric_type line_number_)
 
- Public Member Functions inherited from etl::exception
ETL_CONSTEXPR exception (string_type reason_, string_type, numeric_type line_)
 Constructor.
 
ETL_CONSTEXPR string_type what () const
 
ETL_CONSTEXPR string_type file_name () const
 
ETL_CONSTEXPR numeric_type line_number () const
 

Additional Inherited Members

- Public Types inherited from etl::exception
typedef const charstring_type
 
typedef int numeric_type
 

◆ etl::map_iterator

class etl::map_iterator

Iterator exception for the map.

Public Member Functions

 map_iterator (string_type file_name_, numeric_type line_number_)
 
- Public Member Functions inherited from etl::map_exception
 map_exception (string_type reason_, string_type file_name_, numeric_type line_number_)
 
- Public Member Functions inherited from etl::exception
ETL_CONSTEXPR exception (string_type reason_, string_type, numeric_type line_)
 Constructor.
 
ETL_CONSTEXPR string_type what () const
 
ETL_CONSTEXPR string_type file_name () const
 
ETL_CONSTEXPR numeric_type line_number () const
 

Additional Inherited Members

- Public Types inherited from etl::exception
typedef const charstring_type
 
typedef int numeric_type
 

◆ etl::map_base

class etl::map_base

The base class for all maps.

Public Types

typedef size_t size_type
 The type used for determining the size of map.
 

Public Member Functions

size_type size () const
 Gets the size of the map.
 
size_type max_size () const
 Gets the maximum possible size of the map.
 
bool empty () const
 Checks to see if the map is empty.
 
bool full () const
 Checks to see if the map is full.
 
size_type capacity () const
 
size_t available () const
 

Protected Types

enum  { kLeft = 0 , kRight = 1 , kNeither = 2 }
 

Protected Member Functions

 map_base (size_type max_size_)
 The constructor that is called from derived classes.
 
 ~map_base ()
 Destructor.
 
void balance_node (Node *&critical_node)
 Balance the critical node at the position provided as needed.
 
void rotate_2node (Node *&position, uint_least8_t dir)
 Rotate two nodes at the position provided the to balance the tree.
 
void rotate_3node (Node *&position, uint_least8_t dir, uint_least8_t third)
 Rotate three nodes at the position provided the to balance the tree.
 
Nodefind_limit_node (Node *position, const int8_t dir) const
 
const Nodefind_limit_node (const Node *position, const int8_t dir) const
 
void attach_node (Node *&position, Node &node)
 Attach the provided node to the position provided.
 
void detach_node (Node *&position, Node *&replacement)
 Detach the node at the position provided.
 

Protected Attributes

size_type current_size
 The number of the used nodes.
 
const size_type CAPACITY
 The maximum size of the map.
 
Noderoot_node
 The node that acts as the map root.
 
 ETL_DECLARE_DEBUG_COUNT
 

Member Function Documentation

◆ available()

size_t etl::map_base::available ( ) const
inline

Returns the remaining capacity.

Returns
The remaining capacity.

◆ capacity()

size_type etl::map_base::capacity ( ) const
inline

Returns the capacity of the vector.

Returns
The capacity of the vector.

◆ find_limit_node() [1/2]

const Node * etl::map_base::find_limit_node ( const Node position,
const int8_t  dir 
) const
inlineprotected

Find the node whose key would go before all the other keys from the position provided

◆ find_limit_node() [2/2]

Node * etl::map_base::find_limit_node ( Node position,
const int8_t  dir 
) const
inlineprotected

Find the node whose key would go before all the other keys from the position provided

◆ etl::imap

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

A templated base for all etl::map types.

Public Types

typedef TKey key_type
 
typedef ETL_OR_STD::pair< const TKey, TMappedvalue_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_typeconst_key_reference
 Defines the parameter types.
 
typedef mapped_typemapped_reference
 
typedef const mapped_typeconst_mapped_reference
 
typedef etl::iterator_traits< iterator >::difference_type difference_type
 
typedef ETL_OR_STD::reverse_iterator< iteratorreverse_iterator
 
typedef ETL_OR_STD::reverse_iterator< const_iteratorconst_reverse_iterator
 
- Public Types inherited from etl::map_base
typedef size_t size_type
 The type used for determining the size of map.
 

Public Member Functions

iterator begin ()
 Gets the beginning of the map.
 
const_iterator begin () const
 Gets the beginning of the map.
 
iterator end ()
 Gets the end of the map.
 
const_iterator end () const
 Gets the end of the map.
 
const_iterator cbegin () const
 Gets the beginning of the map.
 
const_iterator cend () const
 Gets the end of the map.
 
reverse_iterator rbegin ()
 Gets the reverse beginning of the list.
 
const_reverse_iterator rbegin () const
 Gets the reverse beginning of the list.
 
reverse_iterator rend ()
 Gets the reverse end of the list.
 
const_reverse_iterator rend () const
 Gets the reverse end of the list.
 
const_reverse_iterator crbegin () const
 Gets the reverse beginning of the list.
 
const_reverse_iterator crend () const
 Gets the reverse end of the list.
 
mapped_reference operator[] (const_key_reference key)
 
mapped_reference at (const_key_reference key)
 
const_mapped_reference at (const_key_reference key) const
 
template<typename TIterator >
void assign (TIterator first, TIterator last)
 
void clear ()
 Clears the map.
 
size_type count (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
 
iterator erase (const_iterator position)
 Erases the value at the specified position.
 
size_type erase (const_key_reference key)
 
iterator erase (const_iterator first, const_iterator last)
 Erases a range of elements.
 
iterator find (const_key_reference key)
 
const_iterator find (const_key_reference key) const
 
ETL_OR_STD::pair< iterator, boolinsert (const_reference value)
 
iterator insert (const_iterator, const_reference value)
 
template<class TIterator >
void insert (TIterator first, TIterator last)
 
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
 
imapoperator= (const imap &rhs)
 Assignment operator.
 
key_compare key_comp () const
 How to compare two key elements.
 
value_compare value_comp () const
 How to compare two value elements.
 
bool contains (const TKey &key) const
 Check if the map contains the key.
 
- Public Member Functions inherited from etl::map_base
size_type size () const
 Gets the size of the map.
 
size_type max_size () const
 Gets the maximum possible size of the map.
 
bool empty () const
 Checks to see if the map is empty.
 
bool full () const
 Checks to see if the map is full.
 
size_type capacity () const
 
size_t available () const
 

Protected Member Functions

bool node_comp (const Data_Node &node1, const Data_Node &node2) const
 How to compare node elements.
 
bool node_comp (const Data_Node &node, const_key_reference key) const
 
bool node_comp (const_key_reference key, const Data_Node &node) const
 
 imap (etl::ipool &node_pool, size_t max_size_)
 Constructor.
 
void initialise ()
 Initialise the map.
 
 ~imap ()
 Destructor.
 
- Protected Member Functions inherited from etl::map_base
 map_base (size_type max_size_)
 The constructor that is called from derived classes.
 
 ~map_base ()
 Destructor.
 
void balance_node (Node *&critical_node)
 Balance the critical node at the position provided as needed.
 
void rotate_2node (Node *&position, uint_least8_t dir)
 Rotate two nodes at the position provided the to balance the tree.
 
void rotate_3node (Node *&position, uint_least8_t dir, uint_least8_t third)
 Rotate three nodes at the position provided the to balance the tree.
 
Nodefind_limit_node (Node *position, const int8_t dir) const
 
const Nodefind_limit_node (const Node *position, const int8_t dir) const
 
void attach_node (Node *&position, Node &node)
 Attach the provided node to the position provided.
 
void detach_node (Node *&position, Node *&replacement)
 Detach the node at the position provided.
 

Friends

class iterator
 
class const_iterator
 

Additional Inherited Members

- Protected Types inherited from etl::map_base
enum  { kLeft = 0 , kRight = 1 , kNeither = 2 }
 
- Protected Attributes inherited from etl::map_base
size_type current_size
 The number of the used nodes.
 
const size_type CAPACITY
 The maximum size of the map.
 
Noderoot_node
 The node that acts as the map root.
 
 ETL_DECLARE_DEBUG_COUNT
 

Member Function Documentation

◆ assign()

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

Assigns values to the map. If asserts or exceptions are enabled, emits map_full if the map does not have enough free space. If asserts or exceptions are enabled, emits map_iterator if the iterators are reversed.

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

◆ at() [1/2]

Returns a reference to the value at index 'key' If asserts or exceptions are enabled, emits an etl::lookup_out_of_bounds if the key is not in the range.

Parameters
keyThe key.
Returns
A reference to the value at index 'key'

◆ at() [2/2]

Returns a const reference to the value at index 'key' If asserts or exceptions are enabled, emits an etl::lookup_out_of_bounds if the key is not in the range.

Parameters
keyThe key.
Returns
A const reference to the value at index 'key'

◆ count()

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

Counts the number of elements that contain the key specified.

Parameters
keyThe key to search for.
Returns
1 if element was found, 0 otherwise.

◆ equal_range() [1/2]

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

Returns two iterators with bounding (lower bound, upper bound) the key provided

◆ equal_range() [2/2]

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

Returns two const iterators with bounding (lower bound, upper bound) the key provided.

◆ find() [1/2]

template<typename TKey , typename TMapped , typename TKeyCompare = etl::less<TKey>>
iterator etl::imap< 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::imap< 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.

◆ insert() [1/3]

template<typename TKey , typename TMapped , typename TKeyCompare = etl::less<TKey>>
iterator etl::imap< TKey, TMapped, TKeyCompare >::insert ( const_iterator  ,
const_reference  value 
)
inline

Inserts a value to the map starting at the position recommended. If asserts or exceptions are enabled, emits map_full if the map is already full.

Parameters
positionThe position that would precede the value to insert.
valueThe value to insert.

◆ insert() [2/3]

template<typename TKey , typename TMapped , typename TKeyCompare = etl::less<TKey>>
ETL_OR_STD::pair< iterator, bool > etl::imap< TKey, TMapped, TKeyCompare >::insert ( const_reference  value)
inline

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

Parameters
valueThe value to insert.

◆ insert() [3/3]

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

Inserts a range of values to the map. If asserts or exceptions are enabled, emits map_full if the map 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::imap< TKey, TMapped, TKeyCompare >::lower_bound ( const_key_reference  key)
inline

Returns an iterator pointing to the first element in the container whose key is not considered to go before the key provided or end() if all keys are considered to go before the key provided.

Returns
An iterator pointing to the element not before key or end()

◆ lower_bound() [2/2]

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

Returns a const_iterator pointing to the first element in the container whose key is not considered to go before the key provided or end() if all keys are considered to go before the key provided.

Returns
An const_iterator pointing to the element not before key or end()

◆ operator[]()

template<typename TKey , typename TMapped , typename TKeyCompare = etl::less<TKey>>
mapped_reference etl::imap< TKey, TMapped, TKeyCompare >::operator[] ( const_key_reference  key)
inline

Returns a reference to the value at index 'key'

Parameters
keyThe key.
Returns
A reference to the value at index 'key'

◆ upper_bound() [1/2]

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

Returns an iterator pointing to the first element in the container whose key is not considered to go after the key provided or end() if all keys are considered to go after the key provided.

Returns
An iterator pointing to the element after key or end()

◆ upper_bound() [2/2]

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

Returns a const_iterator pointing to the first element in the container whose key is not considered to go after the key provided or end() if all keys are considered to go after the key provided.

Returns
An const_iterator pointing to the element after key or end()

◆ etl::multimap_exception

class etl::multimap_exception

Exception for the map.

Public Member Functions

 multimap_exception (string_type reason_, string_type file_name_, numeric_type line_number_)
 
- Public Member Functions inherited from etl::exception
ETL_CONSTEXPR exception (string_type reason_, string_type, numeric_type line_)
 Constructor.
 
ETL_CONSTEXPR string_type what () const
 
ETL_CONSTEXPR string_type file_name () const
 
ETL_CONSTEXPR numeric_type line_number () const
 

Additional Inherited Members

- Public Types inherited from etl::exception
typedef const charstring_type
 
typedef int numeric_type
 

◆ etl::multimap_full

class etl::multimap_full

Full exception for the map.

Public Member Functions

 multimap_full (string_type file_name_, numeric_type line_number_)
 
- Public Member Functions inherited from etl::multimap_exception
 multimap_exception (string_type reason_, string_type file_name_, numeric_type line_number_)
 
- Public Member Functions inherited from etl::exception
ETL_CONSTEXPR exception (string_type reason_, string_type, numeric_type line_)
 Constructor.
 
ETL_CONSTEXPR string_type what () const
 
ETL_CONSTEXPR string_type file_name () const
 
ETL_CONSTEXPR numeric_type line_number () const
 

Additional Inherited Members

- Public Types inherited from etl::exception
typedef const charstring_type
 
typedef int numeric_type
 

◆ etl::multimap_out_of_bounds

class etl::multimap_out_of_bounds

Map out of bounds exception.

Public Member Functions

 multimap_out_of_bounds (string_type file_name_, numeric_type line_number_)
 
- Public Member Functions inherited from etl::multimap_exception
 multimap_exception (string_type reason_, string_type file_name_, numeric_type line_number_)
 
- Public Member Functions inherited from etl::exception
ETL_CONSTEXPR exception (string_type reason_, string_type, numeric_type line_)
 Constructor.
 
ETL_CONSTEXPR string_type what () const
 
ETL_CONSTEXPR string_type file_name () const
 
ETL_CONSTEXPR numeric_type line_number () const
 

Additional Inherited Members

- Public Types inherited from etl::exception
typedef const charstring_type
 
typedef int numeric_type
 

◆ etl::multimap_iterator

class etl::multimap_iterator

Iterator exception for the map.

Public Member Functions

 multimap_iterator (string_type file_name_, numeric_type line_number_)
 
- Public Member Functions inherited from etl::multimap_exception
 multimap_exception (string_type reason_, string_type file_name_, numeric_type line_number_)
 
- Public Member Functions inherited from etl::exception
ETL_CONSTEXPR exception (string_type reason_, string_type, numeric_type line_)
 Constructor.
 
ETL_CONSTEXPR string_type what () const
 
ETL_CONSTEXPR string_type file_name () const
 
ETL_CONSTEXPR numeric_type line_number () const
 

Additional Inherited Members

- Public Types inherited from etl::exception
typedef const charstring_type
 
typedef int numeric_type
 

◆ etl::multimap_base

class etl::multimap_base

The base class for all maps.

Public Types

typedef size_t size_type
 The type used for determining the size of map.
 

Public Member Functions

size_type size () const
 Gets the size of the map.
 
size_type max_size () const
 Gets the maximum possible size of the map.
 
bool empty () const
 Checks to see if the map is empty.
 
bool full () const
 Checks to see if the map is full.
 
size_type capacity () const
 
size_t available () const
 

Protected Types

enum  { kLeft , kRight , kNeither }
 

Protected Member Functions

 multimap_base (size_type max_size_)
 The constructor that is called from derived classes.
 
 ~multimap_base ()
 The constructor that is called from derived classes.
 
void balance_node (Node *&critical_node)
 Balance the critical node at the position provided as needed.
 
void rotate_2node (Node *&position, uint_least8_t dir)
 Rotate two nodes at the position provided the to balance the tree.
 
void rotate_3node (Node *&position, uint_least8_t dir, uint_least8_t third)
 Rotate three nodes at the position provided the to balance the tree.
 
void next_node (Node *&position) const
 Find the next node in sequence from the node provided.
 
void next_node (const Node *&position) const
 Find the next node in sequence from the node provided.
 
void prev_node (Node *&position) const
 Find the previous node in sequence from the node provided.
 
void prev_node (const Node *&position) const
 Find the previous node in sequence from the node provided.
 
Nodefind_limit_node (Node *position, const int8_t dir) const
 
void attach_node (Node *parent, Node *&position, Node &node)
 Attach the provided node to the position provided.
 
void detach_node (Node *&position, Node *&replacement)
 Detach the node at the position provided.
 

Protected Attributes

size_type current_size
 The number of the used nodes.
 
const size_type CAPACITY
 The maximum size of the map.
 
Noderoot_node
 The node that acts as the multimap root.
 
 ETL_DECLARE_DEBUG_COUNT
 

Member Function Documentation

◆ available()

size_t etl::multimap_base::available ( ) const
inline

Returns the remaining capacity.

Returns
The remaining capacity.

◆ capacity()

size_type etl::multimap_base::capacity ( ) const
inline

Returns the capacity of the vector.

Returns
The capacity of the vector.

◆ find_limit_node()

Node * etl::multimap_base::find_limit_node ( Node position,
const int8_t  dir 
) const
inlineprotected

Find the node whose key would go before all the other keys from the position provided

◆ etl::imultimap

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

A templated base for all etl::multimap types.

Public Types

typedef ETL_OR_STD::pair< const TKey, TMappedvalue_type
 
typedef const 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_typeconst_key_reference
 
typedef etl::iterator_traits< iterator >::difference_type difference_type
 
typedef ETL_OR_STD::reverse_iterator< iteratorreverse_iterator
 
typedef ETL_OR_STD::reverse_iterator< const_iteratorconst_reverse_iterator
 
- Public Types inherited from etl::multimap_base
typedef size_t size_type
 The type used for determining the size of map.
 

Public Member Functions

iterator begin ()
 Gets the beginning of the multimap.
 
const_iterator begin () const
 Gets the beginning of the multimap.
 
iterator end ()
 Gets the end of the multimap.
 
const_iterator end () const
 Gets the end of the multimap.
 
const_iterator cbegin () const
 Gets the beginning of the multimap.
 
const_iterator cend () const
 Gets the end of the multimap.
 
reverse_iterator rbegin ()
 Gets the reverse beginning of the list.
 
const_reverse_iterator rbegin () const
 Gets the reverse beginning of the list.
 
reverse_iterator rend ()
 Gets the reverse end of the list.
 
const_reverse_iterator rend () const
 Gets the reverse end of the list.
 
const_reverse_iterator crbegin () const
 Gets the reverse beginning of the list.
 
const_reverse_iterator crend () const
 Gets the reverse end of the list.
 
template<typename TIterator >
void assign (TIterator first, TIterator last)
 
void clear ()
 Clears the multimap.
 
size_type count (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
 
iterator erase (iterator position)
 Erases the value at the specified position.
 
iterator erase (const_iterator position)
 Erases the value at the specified position.
 
size_type erase (const_key_reference key)
 
iterator erase (const_iterator first, const_iterator last)
 Erases a range of elements.
 
iterator find (const_key_reference key)
 
const_iterator find (const_key_reference key) const
 
iterator insert (const_reference value)
 
iterator insert (const_iterator, const_reference value)
 
template<class TIterator >
void insert (TIterator first, TIterator last)
 
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
 
imultimapoperator= (const imultimap &rhs)
 Assignment operator.
 
key_compare key_comp () const
 How to compare two key elements.
 
value_compare value_comp () const
 How to compare two value elements.
 
bool contains (const TKey &key) const
 Check if the map contains the key.
 
- Public Member Functions inherited from etl::multimap_base
size_type size () const
 Gets the size of the map.
 
size_type max_size () const
 Gets the maximum possible size of the map.
 
bool empty () const
 Checks to see if the map is empty.
 
bool full () const
 Checks to see if the map is full.
 
size_type capacity () const
 
size_t available () const
 

Protected Member Functions

bool node_comp (const Data_Node &node1, const Data_Node &node2) const
 How to compare node elements.
 
bool node_comp (const Data_Node &node, const_key_reference key) const
 
bool node_comp (const_key_reference key, const Data_Node &node) const
 
 imultimap (etl::ipool &node_pool, size_t max_size_)
 Constructor.
 
void initialise ()
 Initialise the multimap.
 
 ~imultimap ()
 Destructor.
 
- Protected Member Functions inherited from etl::multimap_base
 multimap_base (size_type max_size_)
 The constructor that is called from derived classes.
 
 ~multimap_base ()
 The constructor that is called from derived classes.
 
void balance_node (Node *&critical_node)
 Balance the critical node at the position provided as needed.
 
void rotate_2node (Node *&position, uint_least8_t dir)
 Rotate two nodes at the position provided the to balance the tree.
 
void rotate_3node (Node *&position, uint_least8_t dir, uint_least8_t third)
 Rotate three nodes at the position provided the to balance the tree.
 
void next_node (Node *&position) const
 Find the next node in sequence from the node provided.
 
void next_node (const Node *&position) const
 Find the next node in sequence from the node provided.
 
void prev_node (Node *&position) const
 Find the previous node in sequence from the node provided.
 
void prev_node (const Node *&position) const
 Find the previous node in sequence from the node provided.
 
Nodefind_limit_node (Node *position, const int8_t dir) const
 
void attach_node (Node *parent, Node *&position, Node &node)
 Attach the provided node to the position provided.
 
void detach_node (Node *&position, Node *&replacement)
 Detach the node at the position provided.
 

Friends

class iterator
 
class const_iterator
 

Additional Inherited Members

- Protected Types inherited from etl::multimap_base
enum  { kLeft , kRight , kNeither }
 
- Protected Attributes inherited from etl::multimap_base
size_type current_size
 The number of the used nodes.
 
const size_type CAPACITY
 The maximum size of the map.
 
Noderoot_node
 The node that acts as the multimap root.
 
 ETL_DECLARE_DEBUG_COUNT
 

Member Function Documentation

◆ assign()

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

Assigns values to the multimap. If asserts or exceptions are enabled, emits map_full if the multimap does not have enough free space. If asserts or exceptions are enabled, emits map_iterator if the iterators are reversed.

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

◆ count()

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

Counts the number of elements that contain the key specified.

Parameters
keyThe key to search for.
Returns
1 if element was found, 0 otherwise.

◆ equal_range() [1/2]

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

Returns two iterators with bounding (lower bound, upper bound) the key provided

◆ equal_range() [2/2]

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

Returns two const iterators with bounding (lower bound, upper bound) the key provided.

◆ find() [1/2]

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::imultimap< 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.

◆ insert() [1/3]

template<typename TKey , typename TMapped , typename TKeyCompare = etl::less<TKey>>
iterator etl::imultimap< TKey, TMapped, TKeyCompare >::insert ( const_iterator  ,
const_reference  value 
)
inline

Inserts a value to the multimap starting at the position recommended. If asserts or exceptions are enabled, emits map_full if the multimap is already full.

Parameters
positionThe position that would precede the value to insert.
valueThe value to insert.

◆ insert() [2/3]

template<typename TKey , typename TMapped , typename TKeyCompare = etl::less<TKey>>
iterator etl::imultimap< TKey, TMapped, TKeyCompare >::insert ( const_reference  value)
inline

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

Parameters
valueThe value to insert.

◆ insert() [3/3]

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

Inserts a range of values to the multimap. If asserts or exceptions are enabled, emits map_full if the 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::imultimap< TKey, TMapped, TKeyCompare >::lower_bound ( const_key_reference  key)
inline

Returns an iterator pointing to the first element in the container whose key is not considered to go before the key provided or end() if all keys are considered to go before the key provided.

Returns
An iterator pointing to the element not before key or end()

◆ lower_bound() [2/2]

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

Returns a const_iterator pointing to the first element in the container whose key is not considered to go before the key provided or end() if all keys are considered to go before the key provided.

Returns
An const_iterator pointing to the element not before key or end()

◆ upper_bound() [1/2]

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

Returns an iterator pointing to the first element in the container whose key is not considered to go after the key provided or end() if all keys are considered to go after the key provided.

Returns
An iterator pointing to the element after key or end()

◆ upper_bound() [2/2]

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

Returns a const_iterator pointing to the first element in the container whose key is not considered to go after the key provided or end() if all keys are considered to go after the key provided.

Returns
An const_iterator pointing to the element after key or end()