Loading...
Searching...
No Matches
etl::map< TKey, TValue, MAX_SIZE_, TCompare > Class Template Reference

A templated map implementation that uses a fixed size buffer. More...

`#include <map.h>`

## Public Member Functions

| map ()
| Default constructor.
| map (const map &other)
| Copy constructor.
template<typename TIterator>
| map (TIterator first, TIterator last)
| ~map ()
| Destructor.
map & | operator= (const map &rhs)
| Assignment operator.
Public Member Functions inherited from etl::imap< TKey, TMapped, TKeyCompare >
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, iterator > | equal_range (const_key_reference key)
ETL_OR_STD::pair< const_iterator, const_iterator > | equal_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, bool > | insert (const_reference value)
iterator | insert (const_iterator, const_reference 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.
template<typename T1>
ETL_OR_STD::pair< iterator, bool > | try_emplace (const_key_reference key, const T1 &value1)
| Inserts an element into the map if the key does not exist.
template<typename T1, typename T2>
ETL_OR_STD::pair< iterator, bool > | try_emplace (const_key_reference key, const T1 &value1, const T2 &value2)
| Inserts an element into the map if the key does not exist.
template<typename T1, typename T2, typename T3>
ETL_OR_STD::pair< iterator, bool > | try_emplace (const_key_reference key, const T1 &value1, const T2 &value2, const T3 &value3)
| Inserts an element into the map if the key does not exist.
template<typename T1, typename T2, typename T3, typename T4>
ETL_OR_STD::pair< iterator, bool > | try_emplace (const_key_reference key, const T1 &value1, const T2 &value2, const T3 &value3, const T4 &value4)
| Inserts an element into the map if the key does not exist.
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
imap & | operator= (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

## Static Public Attributes

static ETL_CONSTANT size_t | MAX_SIZE = MAX_SIZE_

## Additional Inherited Members

Public Types inherited from etl::imap< TKey, TMapped, TKeyCompare >
typedef TKey | key_type
typedef ETL_OR_STD::pair< const TKey, TMapped > | value_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
| Defines the parameter types.
typedef mapped_type & | mapped_reference
typedef const mapped_type & | const_mapped_reference
typedef etl::iterator_traits< iterator >::difference_type | difference_type
typedef ETL_OR_STD::reverse_iterator< iterator > | reverse_iterator
typedef ETL_OR_STD::reverse_iterator< const_iterator > | const_reverse_iterator
Public Types inherited from etl::map_base
typedef size_t | size_type
| The type used for determining the size of map.
Protected Types inherited from etl::map_base
enum | { kLeft = 0 , kRight = 1 , kNeither = 2 }
Protected Member Functions inherited from etl::imap< TKey, TMapped, TKeyCompare >
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.
Node * | find_limit_node (Node *position, const int8_t dir) const
const Node * | find_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 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.
Node * | root_node
| The node that acts as the map root.
| ETL_DECLARE_DEBUG_COUNT

## Detailed Description

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

A templated map implementation that uses a fixed size buffer.

## Constructor & Destructor Documentation

## map()

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

etl::map< TKey, TValue, MAX_SIZE_, TCompare >::map | ( | TIterator | first,
|  | TIterator | last )

inline

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.

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

- include/etl/map.h