Stefan Scholz / ETL
Embed: (wiki syntax)

« Back to documentation index

iunordered_multimap< TKey, T, THash, TKeyEqual > Class Template Reference

iunordered_multimap< TKey, T, THash, TKeyEqual > Class Template Reference
[unordered_multimap]

The base class for specifically sized unordered_multimap. More...

#include <unordered_multimap.h>

Public Member Functions

iterator begin ()
 Returns an iterator to the beginning of the unordered_multimap.
const_iterator begin () const
 Returns a const_iterator to the beginning of the unordered_multimap.
const_iterator cbegin () const
 Returns a const_iterator to the beginning of the unordered_multimap.
local_iterator begin (size_t i)
 Returns an iterator to the beginning of the unordered_multimap bucket.
local_const_iterator begin (size_t i) const
 Returns a const_iterator to the beginning of the unordered_multimap bucket.
local_const_iterator cbegin (size_t i) const
 Returns a const_iterator to the beginning of the unordered_multimap bucket.
iterator end ()
 Returns an iterator to the end of the unordered_multimap.
const_iterator end () const
 Returns a const_iterator to the end of the unordered_multimap.
const_iterator cend () const
 Returns a const_iterator to the end of the unordered_multimap.
local_iterator end (size_t i)
 Returns an iterator to the end of the unordered_multimap bucket.
local_const_iterator end (size_t i) const
 Returns a const_iterator to the end of the unordered_multimap bucket.
local_const_iterator cend (size_t i) const
 Returns a const_iterator to the end of the unordered_multimap bucket.
size_type get_bucket_index (key_parameter_t key) const
 Returns the bucket index for the key.
size_type bucket_size (key_parameter_t key) const
 Returns the size of the bucket key.
size_type max_bucket_count () const
 Returns the maximum number of the buckets the container can hold.
size_type bucket_count () const
 Returns the number of the buckets the container holds.
template<typename TIterator >
void assign (TIterator first_, TIterator last_)
 Assigns values to the unordered_multimap.
iterator insert (const value_type &key_value_pair)
 Inserts a value to the unordered_multimap.
iterator insert (const_iterator position, const value_type &key_value_pair)
 Inserts a value to the unordered_multimap.
template<class TIterator >
void insert (TIterator first_, TIterator last_)
 Inserts a range of values to the unordered_multimap.
size_t erase (key_parameter_t key)
 Erases an element.
iterator erase (const_iterator ielement)
 Erases an element.
iterator erase (const_iterator first_, const_iterator last_)
 Erases a range of elements.
void clear ()
 Clears the unordered_multimap.
size_t count (key_parameter_t key) const
 Counts an element.
iterator find (key_parameter_t key)
 Finds an element.
const_iterator find (key_parameter_t key) const
 Finds an element.
std::pair< iterator, iterator > equal_range (key_parameter_t key)
 Returns a range containing all elements with key key in the container.
std::pair< const_iterator,
const_iterator > 
equal_range (key_parameter_t key) const
 Returns a range containing all elements with key key in the container.
size_type size () const
 Gets the size of the unordered_multimap.
size_type max_size () const
 Gets the maximum possible size of the unordered_multimap.
bool empty () const
 Checks to see if the unordered_multimap is empty.
bool full () const
 Checks to see if the unordered_multimap is full.
size_t available () const
 Returns the remaining capacity.
float load_factor () const
 Returns the load factor = size / bucket_count.
hasher hash_function () const
 Returns the function that hashes the keys.
key_equal key_eq () const
 Returns the function that compares the keys.
iunordered_multimapoperator= (const iunordered_multimap &rhs)
 Assignment operator.

Protected Member Functions

 iunordered_multimap (pool_t &node_pool_, bucket_t *pbuckets_, size_t number_of_buckets_)
 Constructor.
void initialise ()
 Initialise the unordered_multimap.

Detailed Description

template<typename TKey, typename T, typename THash = etl::hash<TKey>, typename TKeyEqual = std::equal_to<TKey>>
class etl::iunordered_multimap< TKey, T, THash, TKeyEqual >

The base class for specifically sized unordered_multimap.

Can be used as a reference type for all unordered_multimap containing a specific type.

Definition at line 127 of file unordered_multimap.h.


Constructor & Destructor Documentation

iunordered_multimap ( pool_t &  node_pool_,
bucket_t pbuckets_,
size_t  number_of_buckets_ 
) [protected]

Constructor.

Definition at line 1110 of file unordered_multimap.h.


Member Function Documentation

void assign ( TIterator  first_,
TIterator  last_ 
)

Assigns values to the unordered_multimap.

If asserts or exceptions are enabled, emits unordered_multimap_full if the unordered_multimap does not have enough free space. If asserts or exceptions are enabled, emits unordered_multimap_iterator if the iterators are reversed.

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

Definition at line 637 of file unordered_multimap.h.

size_t available (  ) const

Returns the remaining capacity.

Returns:
The remaining capacity.

Definition at line 1059 of file unordered_multimap.h.

iterator begin (  )

Returns an iterator to the beginning of the unordered_multimap.

Returns:
An iterator to the beginning of the unordered_multimap.

Definition at line 487 of file unordered_multimap.h.

const_iterator begin (  ) const

Returns a const_iterator to the beginning of the unordered_multimap.

Returns:
A const iterator to the beginning of the unordered_multimap.

Definition at line 496 of file unordered_multimap.h.

local_iterator begin ( size_t  i )

Returns an iterator to the beginning of the unordered_multimap bucket.

Returns:
An iterator to the beginning of the unordered_multimap bucket.

Definition at line 514 of file unordered_multimap.h.

local_const_iterator begin ( size_t  i ) const

Returns a const_iterator to the beginning of the unordered_multimap bucket.

Returns:
A const iterator to the beginning of the unordered_multimap bucket.

Definition at line 523 of file unordered_multimap.h.

size_type bucket_count (  ) const

Returns the number of the buckets the container holds.

Returns:
The number of the buckets the container holds.

Definition at line 624 of file unordered_multimap.h.

size_type bucket_size ( key_parameter_t  key ) const

Returns the size of the bucket key.

Returns:
The bucket size of the bucket key.

Definition at line 604 of file unordered_multimap.h.

local_const_iterator cbegin ( size_t  i ) const

Returns a const_iterator to the beginning of the unordered_multimap bucket.

Returns:
A const iterator to the beginning of the unordered_multimap bucket.

Definition at line 532 of file unordered_multimap.h.

const_iterator cbegin (  ) const

Returns a const_iterator to the beginning of the unordered_multimap.

Returns:
A const iterator to the beginning of the unordered_multimap.

Definition at line 505 of file unordered_multimap.h.

const_iterator cend (  ) const

Returns a const_iterator to the end of the unordered_multimap.

Returns:
A const iterator to the end of the unordered_multimap.

Definition at line 559 of file unordered_multimap.h.

local_const_iterator cend ( size_t  i ) const

Returns a const_iterator to the end of the unordered_multimap bucket.

Returns:
A const iterator to the end of the unordered_multimap bucket.

Definition at line 586 of file unordered_multimap.h.

void clear (  )

Clears the unordered_multimap.

Definition at line 872 of file unordered_multimap.h.

size_t count ( key_parameter_t  key ) const

Counts an element.

Parameters:
keyThe key to search for.
Returns:
1 if the key exists, otherwise 0.

Definition at line 882 of file unordered_multimap.h.

bool empty (  ) const

Checks to see if the unordered_multimap is empty.

Definition at line 1042 of file unordered_multimap.h.

const_iterator end (  ) const

Returns a const_iterator to the end of the unordered_multimap.

Returns:
A const iterator to the end of the unordered_multimap.

Definition at line 550 of file unordered_multimap.h.

local_iterator end ( size_t  i )

Returns an iterator to the end of the unordered_multimap bucket.

Returns:
An iterator to the end of the unordered_multimap bucket.

Definition at line 568 of file unordered_multimap.h.

local_const_iterator end ( size_t  i ) const

Returns a const_iterator to the end of the unordered_multimap bucket.

Returns:
A const iterator to the end of the unordered_multimap bucket.

Definition at line 577 of file unordered_multimap.h.

iterator end (  )

Returns an iterator to the end of the unordered_multimap.

Returns:
An iterator to the end of the unordered_multimap.

Definition at line 541 of file unordered_multimap.h.

std::pair<const_iterator, const_iterator> equal_range ( key_parameter_t  key ) const

Returns a range containing all elements with key key in the container.

The range is defined by two iterators, the first pointing to the first element of the wanted range and the second pointing past the last element of the range.

Parameters:
keyThe key to search for.
Returns:
A const iterator pair to the range of elements if the key exists, otherwise end().

Definition at line 1005 of file unordered_multimap.h.

std::pair<iterator, iterator> equal_range ( key_parameter_t  key )

Returns a range containing all elements with key key in the container.

The range is defined by two iterators, the first pointing to the first element of the wanted range and the second pointing past the last element of the range.

Parameters:
keyThe key to search for.
Returns:
An iterator pair to the range of elements if the key exists, otherwise end().

Definition at line 979 of file unordered_multimap.h.

iterator erase ( const_iterator  first_,
const_iterator  last_ 
)

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 to by last.

Parameters:
firstIterator to the first element.
lastIterator to the last element.

Definition at line 821 of file unordered_multimap.h.

size_t erase ( key_parameter_t  key )

Erases an element.

Parameters:
keyThe key to erase.
Returns:
The number of elements erased.

Definition at line 754 of file unordered_multimap.h.

iterator erase ( const_iterator  ielement )

Erases an element.

Parameters:
ielementIterator to the element.

Definition at line 790 of file unordered_multimap.h.

iterator find ( key_parameter_t  key )

Finds an element.

Parameters:
keyThe key to search for.
Returns:
An iterator to the element if the key exists, otherwise end().

Definition at line 908 of file unordered_multimap.h.

const_iterator find ( key_parameter_t  key ) const

Finds an element.

Parameters:
keyThe key to search for.
Returns:
An iterator to the element if the key exists, otherwise end().

Definition at line 942 of file unordered_multimap.h.

bool full (  ) const

Checks to see if the unordered_multimap is full.

Definition at line 1050 of file unordered_multimap.h.

size_type get_bucket_index ( key_parameter_t  key ) const

Returns the bucket index for the key.

Returns:
The bucket index for the key.

Definition at line 595 of file unordered_multimap.h.

hasher hash_function (  ) const

Returns the function that hashes the keys.

Returns:
The function that hashes the keys..

Definition at line 1077 of file unordered_multimap.h.

void initialise (  ) [protected]

Initialise the unordered_multimap.

Definition at line 1120 of file unordered_multimap.h.

iterator insert ( const_iterator  position,
const value_type &  key_value_pair 
)

Inserts a value to the unordered_multimap.

If asserts or exceptions are enabled, emits unordered_multimap_full if the unordered_multimap is already full.

Parameters:
positionThe position to insert at.
valueThe value to insert.

Definition at line 728 of file unordered_multimap.h.

void insert ( TIterator  first_,
TIterator  last_ 
)

Inserts a range of values to the unordered_multimap.

If asserts or exceptions are enabled, emits unordered_multimap_full if the unordered_multimap does not have enough free space.

Parameters:
positionThe position to insert at.
firstThe first element to add.
lastThe last + 1 element to add.

Definition at line 741 of file unordered_multimap.h.

iterator insert ( const value_type &  key_value_pair )

Inserts a value to the unordered_multimap.

If asserts or exceptions are enabled, emits unordered_multimap_full if the unordered_multimap is already full.

Parameters:
valueThe value to insert.

Definition at line 658 of file unordered_multimap.h.

key_equal key_eq (  ) const

Returns the function that compares the keys.

Returns:
The function that compares the keys..

Definition at line 1086 of file unordered_multimap.h.

float load_factor (  ) const

Returns the load factor = size / bucket_count.

Returns:
The load factor = size / bucket_count.

Definition at line 1068 of file unordered_multimap.h.

size_type max_bucket_count (  ) const

Returns the maximum number of the buckets the container can hold.

Returns:
The maximum number of the buckets the container can hold.

Definition at line 615 of file unordered_multimap.h.

size_type max_size (  ) const

Gets the maximum possible size of the unordered_multimap.

Definition at line 1034 of file unordered_multimap.h.

iunordered_multimap& operator= ( const iunordered_multimap< TKey, T, THash, TKeyEqual > &  rhs )

Assignment operator.

Definition at line 1094 of file unordered_multimap.h.

size_type size (  ) const

Gets the size of the unordered_multimap.

Definition at line 1026 of file unordered_multimap.h.