Embedded Template Library  1.0
etl::unordered_map< TKey, TValue, MAX_SIZE_, MAX_BUCKETS_, THash, TKeyEqual > Class Template Reference

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

#include <unordered_map.h>

Public Member Functions

 unordered_map ()
 Default constructor.
 
 unordered_map (const unordered_map &other)
 Copy constructor.
 
template<typename TIterator >
 unordered_map (TIterator first_, TIterator last_)
 
 ~unordered_map ()
 Destructor.
 
unordered_mapoperator= (const unordered_map &rhs)
 Assignment operator.
 
- Public Member Functions inherited from etl::iunordered_map< TKey, TValue, etl::hash< TKey >, etl::equal_to< TKey > >
iterator begin ()
 
const_iterator begin () const
 
local_iterator begin (size_t i)
 
local_const_iterator begin (size_t i) const
 
const_iterator cbegin () const
 
local_const_iterator cbegin (size_t i) const
 
iterator end ()
 
const_iterator end () const
 
local_iterator end (size_t i)
 
local_const_iterator end (size_t i) const
 
const_iterator cend () const
 
local_const_iterator cend (size_t i) const
 
size_type get_bucket_index (key_parameter_t key) const
 
size_type bucket_size (key_parameter_t key) const
 
size_type max_bucket_count () const
 
size_type bucket_count () const
 
mapped_type & operator[] (key_parameter_t key)
 
mapped_type & at (key_parameter_t key)
 
const mapped_type & at (key_parameter_t key) const
 
void assign (TIterator first_, TIterator last_)
 
ETL_OR_STD::pair< iterator, bool > insert (const_reference key_value_pair)
 
iterator insert (const_iterator, const_reference key_value_pair)
 
void insert (TIterator first_, TIterator last_)
 
size_t erase (key_parameter_t key)
 
iterator erase (const_iterator ielement)
 
iterator erase (const_iterator first_, const_iterator last_)
 
void clear ()
 Clears the unordered_map.
 
size_t count (key_parameter_t key) const
 
iterator find (key_parameter_t key)
 
const_iterator find (key_parameter_t key) const
 
ETL_OR_STD::pair< iterator, iteratorequal_range (key_parameter_t key)
 
ETL_OR_STD::pair< const_iterator, const_iterator > equal_range (key_parameter_t key) const
 
size_type size () const
 Gets the size of the unordered_map.
 
size_type max_size () const
 Gets the maximum possible size of the unordered_map.
 
size_type capacity () const
 Gets the maximum possible size of the unordered_map.
 
bool empty () const
 Checks to see if the unordered_map is empty.
 
bool full () const
 Checks to see if the unordered_map is full.
 
size_t available () const
 
float load_factor () const
 
hasher hash_function () const
 
key_equal key_eq () const
 
iunordered_mapoperator= (const iunordered_map &rhs)
 Assignment operator.
 

Static Public Attributes

static const size_t MAX_SIZE = MAX_SIZE_
 
static const size_t MAX_BUCKETS = MAX_BUCKETS_
 

Additional Inherited Members

- Public Types inherited from etl::iunordered_map< TKey, TValue, etl::hash< TKey >, etl::equal_to< TKey > >
typedef ETL_OR_STD::pair< const TKey, TValue > value_type
 
typedef TKey key_type
 
typedef TValue mapped_type
 
typedef etl::hash< TKey > hasher
 
typedef etl::equal_to< TKey > key_equal
 
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 etl::parameter_type< TKey >::type key_parameter_t
 
typedef etl::forward_link< 0 > link_t
 
typedef bucket_t::iterator local_iterator
 
typedef bucket_t::const_iterator local_const_iterator
 
typedef etl::iterator_traits< iterator >::difference_type difference_type
 
- Protected Member Functions inherited from etl::iunordered_map< TKey, TValue, etl::hash< TKey >, etl::equal_to< TKey > >
 iunordered_map (pool_t &node_pool_, bucket_t *pbuckets_, size_t number_of_buckets_)
 Constructor.
 
void initialise ()
 Initialise the unordered_map.
 
 ~iunordered_map ()
 For library debugging purposes only. More...
 

Detailed Description

template<typename TKey, typename TValue, const size_t MAX_SIZE_, const size_t MAX_BUCKETS_ = MAX_SIZE_, typename THash = etl::hash<TKey>, typename TKeyEqual = etl::equal_to<TKey>>
class etl::unordered_map< TKey, TValue, MAX_SIZE_, MAX_BUCKETS_, THash, TKeyEqual >

A templated unordered_map implementation that uses a fixed size buffer.

Constructor & Destructor Documentation

◆ unordered_map()

template<typename TKey , typename TValue , const size_t MAX_SIZE_, const size_t MAX_BUCKETS_ = MAX_SIZE_, typename THash = etl::hash<TKey>, typename TKeyEqual = etl::equal_to<TKey>>
template<typename TIterator >
etl::unordered_map< TKey, TValue, MAX_SIZE_, MAX_BUCKETS_, THash, TKeyEqual >::unordered_map ( TIterator  first_,
TIterator  last_ 
)
inline

Constructor, from an iterator range.

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

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