Stefan Scholz / ETL
Embed: (wiki syntax)

« Back to documentation index

iflat_multimap< TKey, TMapped, TKeyCompare > Class Template Reference

iflat_multimap< TKey, TMapped, TKeyCompare > Class Template Reference
[flat_multimap]

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

#include <flat_multimap.h>

Inherits etl::ireference_flat_multimap< TKey, TMapped, TKeyCompare >.

Public Member Functions

iterator begin ()
 Returns an iterator to the beginning of the flat_multimap.
const_iterator begin () const
 Returns a const_iterator to the beginning of the flat_multimap.
iterator end ()
 Returns an iterator to the end of the flat_multimap.
const_iterator end () const
 Returns a const_iterator to the end of the flat_multimap.
const_iterator cbegin () const
 Returns a const_iterator to the beginning of the flat_multimap.
const_iterator cend () const
 Returns a const_iterator to the end of the flat_multimap.
reverse_iterator rbegin ()
 Returns an reverse iterator to the reverse beginning of the flat_multimap.
const_reverse_iterator rbegin () const
 Returns a const reverse iterator to the reverse beginning of the flat_multimap.
reverse_iterator rend ()
 Returns a reverse iterator to the end + 1 of the flat_multimap.
const_reverse_iterator rend () const
 Returns a const reverse iterator to the end + 1 of the flat_multimap.
const_reverse_iterator crbegin () const
 Returns a const reverse iterator to the reverse beginning of the flat_multimap.
const_reverse_iterator crend () const
 Returns a const reverse iterator to the end + 1 of the flat_multimap.
template<typename TIterator >
void assign (TIterator first, TIterator last)
 Assigns values to the flat_multimap.
std::pair< iterator, bool > insert (const value_type &value)
 Inserts a value to the flat_multimap.
iterator insert (iterator position, const value_type &value)
 Inserts a value to the flast_multi.
template<class TIterator >
void insert (TIterator first, TIterator last)
 Inserts a range of values to the flat_multimap.
size_t erase (key_parameter_t key)
 Erases an element.
void erase (iterator i_element)
 Erases an element.
void erase (iterator first, iterator last)
 Erases a range of elements.
void clear ()
 Clears the flat_multimap.
iterator find (key_parameter_t key)
 Finds an element.
const_iterator find (key_parameter_t key) const
 Finds an element.
size_t count (key_parameter_t key) const
 Counts an element.
iterator lower_bound (key_parameter_t key)
 Finds the lower bound of a key.
const_iterator lower_bound (key_parameter_t key) const
 Finds the lower bound of a key.
iterator upper_bound (key_parameter_t key)
 Finds the upper bound of a key.
const_iterator upper_bound (key_parameter_t key) const
 Finds the upper bound of a key.
std::pair< iterator, iterator > equal_range (key_parameter_t key)
 Finds the range of equal elements of a key.
std::pair< const_iterator,
const_iterator > 
equal_range (key_parameter_t key) const
 Finds the range of equal elements of a key.
iflat_multimapoperator= (const iflat_multimap &rhs)
 Assignment operator.
size_type size () const
 Gets the current size of the flat_multiset.
bool empty () const
 Checks the 'empty' state of the flat_multiset.
bool full () const
 Checks the 'full' state of the flat_multiset.
size_type capacity () const
 Returns the capacity of the flat_multiset.
size_type max_size () const
 Returns the maximum possible size of the flat_multiset.
size_t available () const
 Returns the remaining capacity.
std::pair< iterator, bool > insert (value_type &value)
 Inserts a value to the reference_flat_multimap.
iterator insert (iterator position, const value_type &value)
 Inserts a value to the flast_multi.
size_t erase (key_parameter_t key)
 Erases an element.
iterator find (key_parameter_t key)
 Finds an element.
const_iterator find (key_parameter_t key) const
 Finds an element.
size_t count (key_parameter_t key) const
 Counts an element.
iterator lower_bound (key_parameter_t key)
 Finds the lower bound of a key.
const_iterator lower_bound (key_parameter_t key) const
 Finds the lower bound of a key.
iterator upper_bound (key_parameter_t key)
 Finds the upper bound of a key.
const_iterator upper_bound (key_parameter_t key) const
 Finds the upper bound of a key.
std::pair< iterator, iterator > equal_range (key_parameter_t key)
 Finds the range of equal elements of a key.
std::pair< const_iterator,
const_iterator > 
equal_range (key_parameter_t key) const
 Finds the range of equal elements of a key.

Protected Member Functions

 iflat_multimap (lookup_t &lookup_, storage_t &storage_)
 Constructor.
std::pair< iterator, bool > insert_at (iterator i_element, value_type &value)
 Inserts a value to the reference_flat_multimap.

Detailed Description

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

The base class for specifically sized flat_multimaps.

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

Definition at line 57 of file flat_multimap.h.


Constructor & Destructor Documentation

iflat_multimap ( lookup_t lookup_,
storage_t &  storage_ 
) [protected]

Constructor.

Definition at line 517 of file flat_multimap.h.


Member Function Documentation

void assign ( TIterator  first,
TIterator  last 
)

Assigns values to the flat_multimap.

If asserts or exceptions are enabled, emits flat_multimap_full if the flat_multimap does not have enough free space. If asserts or exceptions are enabled, emits flat_multimap_iterator if the iterators are reversed.

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

Reimplemented from ireference_flat_multimap< TKey, TMapped, TKeyCompare >.

Definition at line 229 of file flat_multimap.h.

size_t available (  ) const

Returns the remaining capacity.

Returns:
The remaining capacity.

Reimplemented from ireference_flat_multimap< TKey, TMapped, TKeyCompare >.

Definition at line 507 of file flat_multimap.h.

const_iterator begin (  ) const

Returns a const_iterator to the beginning of the flat_multimap.

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

Reimplemented from ireference_flat_multimap< TKey, TMapped, TKeyCompare >.

Definition at line 126 of file flat_multimap.h.

iterator begin (  )

Returns an iterator to the beginning of the flat_multimap.

Returns:
An iterator to the beginning of the flat_multimap.

Reimplemented from ireference_flat_multimap< TKey, TMapped, TKeyCompare >.

Definition at line 117 of file flat_multimap.h.

size_type capacity (  ) const

Returns the capacity of the flat_multiset.

Returns:
The capacity of the flat_multiset.

Reimplemented from ireference_flat_multimap< TKey, TMapped, TKeyCompare >.

Definition at line 489 of file flat_multimap.h.

const_iterator cbegin (  ) const

Returns a const_iterator to the beginning of the flat_multimap.

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

Reimplemented from ireference_flat_multimap< TKey, TMapped, TKeyCompare >.

Definition at line 153 of file flat_multimap.h.

const_iterator cend (  ) const

Returns a const_iterator to the end of the flat_multimap.

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

Reimplemented from ireference_flat_multimap< TKey, TMapped, TKeyCompare >.

Definition at line 162 of file flat_multimap.h.

void clear (  )

Clears the flat_multimap.

Reimplemented from ireference_flat_multimap< TKey, TMapped, TKeyCompare >.

Definition at line 350 of file flat_multimap.h.

size_t count ( key_parameter_t  key ) const [inherited]

Counts an element.

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

Definition at line 601 of file reference_flat_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 380 of file flat_multimap.h.

const_reverse_iterator crbegin (  ) const

Returns a const reverse iterator to the reverse beginning of the flat_multimap.

Returns:
Const reverse iterator to the reverse beginning of the flat_multimap.

Reimplemented from ireference_flat_multimap< TKey, TMapped, TKeyCompare >.

Definition at line 207 of file flat_multimap.h.

const_reverse_iterator crend (  ) const

Returns a const reverse iterator to the end + 1 of the flat_multimap.

Returns:
Const reverse iterator to the end + 1 of the flat_multimap.

Reimplemented from ireference_flat_multimap< TKey, TMapped, TKeyCompare >.

Definition at line 216 of file flat_multimap.h.

bool empty (  ) const

Checks the 'empty' state of the flat_multiset.

Returns:
true if empty.

Reimplemented from ireference_flat_multimap< TKey, TMapped, TKeyCompare >.

Definition at line 471 of file flat_multimap.h.

const_iterator end (  ) const

Returns a const_iterator to the end of the flat_multimap.

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

Reimplemented from ireference_flat_multimap< TKey, TMapped, TKeyCompare >.

Definition at line 144 of file flat_multimap.h.

iterator end (  )

Returns an iterator to the end of the flat_multimap.

Returns:
An iterator to the end of the flat_multimap.

Reimplemented from ireference_flat_multimap< TKey, TMapped, TKeyCompare >.

Definition at line 135 of file flat_multimap.h.

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

Finds the range of equal elements of a key.

Parameters:
keyThe key to search for.
Returns:
An iterator pair.

Definition at line 665 of file reference_flat_multimap.h.

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

Finds the range of equal elements of a key.

Parameters:
keyThe key to search for.
Returns:
An iterator pair.

Definition at line 653 of file reference_flat_multimap.h.

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

Finds the range of equal elements of a key.

Parameters:
keyThe key to search for.
Returns:
An iterator pair.

Definition at line 430 of file flat_multimap.h.

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

Finds the range of equal elements of a key.

Parameters:
keyThe key to search for.
Returns:
An iterator pair.

Definition at line 440 of file flat_multimap.h.

size_t erase ( key_parameter_t  key )

Erases an element.

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

Definition at line 297 of file flat_multimap.h.

void erase ( iterator  i_element )

Erases an element.

Parameters:
i_elementIterator to the element.

Reimplemented from ireference_flat_multimap< TKey, TMapped, TKeyCompare >.

Definition at line 317 of file flat_multimap.h.

void erase ( iterator  first,
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 by last.

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

Reimplemented from ireference_flat_multimap< TKey, TMapped, TKeyCompare >.

Definition at line 332 of file flat_multimap.h.

size_t erase ( key_parameter_t  key ) [inherited]

Erases an element.

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

Definition at line 503 of file reference_flat_multimap.h.

iterator find ( key_parameter_t  key ) [inherited]

Finds an element.

Parameters:
keyThe key to search for.
Returns:
An iterator pointing to the element or end() if not found.

Definition at line 553 of file reference_flat_multimap.h.

const_iterator find ( key_parameter_t  key ) const [inherited]

Finds an element.

Parameters:
keyThe key to search for.
Returns:
An iterator pointing to the element or end() if not found.

Definition at line 577 of file reference_flat_multimap.h.

iterator find ( key_parameter_t  key )

Finds an element.

Parameters:
keyThe key to search for.
Returns:
An iterator pointing to the element or end() if not found.

Definition at line 360 of file flat_multimap.h.

const_iterator find ( key_parameter_t  key ) const

Finds an element.

Parameters:
keyThe key to search for.
Returns:
An iterator pointing to the element or end() if not found.

Definition at line 370 of file flat_multimap.h.

bool full (  ) const

Checks the 'full' state of the flat_multiset.

Returns:
true if full.

Reimplemented from ireference_flat_multimap< TKey, TMapped, TKeyCompare >.

Definition at line 480 of file flat_multimap.h.

iterator insert ( iterator  position,
const value_type &  value 
) [inherited]

Inserts a value to the flast_multi.

If asserts or exceptions are enabled, emits flat_map_full if the flat_map is already full.

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

Definition at line 477 of file reference_flat_multimap.h.

void insert ( TIterator  first,
TIterator  last 
)

Inserts a range of values to the flat_multimap.

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

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

Reimplemented from ireference_flat_multimap< TKey, TMapped, TKeyCompare >.

Definition at line 284 of file flat_multimap.h.

std::pair<iterator, bool> insert ( value_type &  value ) [inherited]

Inserts a value to the reference_flat_multimap.

If asserts or exceptions are enabled, emits reference_flat_multimap_full if the reference_flat_multimap is already full.

Parameters:
valueThe value to insert.

Definition at line 460 of file reference_flat_multimap.h.

std::pair<iterator, bool> insert ( const value_type &  value )

Inserts a value to the flat_multimap.

If asserts or exceptions are enabled, emits flat_multimap_full if the flat_multimap is already full.

Parameters:
valueThe value to insert.

Definition at line 249 of file flat_multimap.h.

iterator insert ( iterator  position,
const value_type &  value 
)

Inserts a value to the flast_multi.

If asserts or exceptions are enabled, emits flat_map_full if the flat_map is already full.

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

Definition at line 271 of file flat_multimap.h.

std::pair<iterator, bool> insert_at ( iterator  i_element,
value_type &  value 
) [protected, inherited]

Inserts a value to the reference_flat_multimap.

Parameters:
i_elementThe place to insert.
valueThe value to insert.

Definition at line 741 of file reference_flat_multimap.h.

iterator lower_bound ( key_parameter_t  key ) [inherited]

Finds the lower bound of a key.

Parameters:
keyThe key to search for.
Returns:
An iterator.

Definition at line 613 of file reference_flat_multimap.h.

const_iterator lower_bound ( key_parameter_t  key ) const [inherited]

Finds the lower bound of a key.

Parameters:
keyThe key to search for.
Returns:
An iterator.

Definition at line 623 of file reference_flat_multimap.h.

const_iterator lower_bound ( key_parameter_t  key ) const

Finds the lower bound of a key.

Parameters:
keyThe key to search for.
Returns:
An iterator.

Definition at line 400 of file flat_multimap.h.

iterator lower_bound ( key_parameter_t  key )

Finds the lower bound of a key.

Parameters:
keyThe key to search for.
Returns:
An iterator.

Definition at line 390 of file flat_multimap.h.

size_type max_size (  ) const

Returns the maximum possible size of the flat_multiset.

Returns:
The maximum size of the flat_multiset.

Reimplemented from ireference_flat_multimap< TKey, TMapped, TKeyCompare >.

Definition at line 498 of file flat_multimap.h.

iflat_multimap& operator= ( const iflat_multimap< TKey, TMapped, TKeyCompare > &  rhs )

Assignment operator.

Definition at line 448 of file flat_multimap.h.

const_reverse_iterator rbegin (  ) const

Returns a const reverse iterator to the reverse beginning of the flat_multimap.

Returns:
Const iterator to the reverse beginning of the flat_multimap.

Reimplemented from ireference_flat_multimap< TKey, TMapped, TKeyCompare >.

Definition at line 180 of file flat_multimap.h.

reverse_iterator rbegin (  )

Returns an reverse iterator to the reverse beginning of the flat_multimap.

Returns:
Iterator to the reverse beginning of the flat_multimap.

Reimplemented from ireference_flat_multimap< TKey, TMapped, TKeyCompare >.

Definition at line 171 of file flat_multimap.h.

const_reverse_iterator rend (  ) const

Returns a const reverse iterator to the end + 1 of the flat_multimap.

Returns:
Const reverse iterator to the end + 1 of the flat_multimap.

Reimplemented from ireference_flat_multimap< TKey, TMapped, TKeyCompare >.

Definition at line 198 of file flat_multimap.h.

reverse_iterator rend (  )

Returns a reverse iterator to the end + 1 of the flat_multimap.

Returns:
Reverse iterator to the end + 1 of the flat_multimap.

Reimplemented from ireference_flat_multimap< TKey, TMapped, TKeyCompare >.

Definition at line 189 of file flat_multimap.h.

size_type size (  ) const

Gets the current size of the flat_multiset.

Returns:
The current size of the flat_multiset.

Reimplemented from ireference_flat_multimap< TKey, TMapped, TKeyCompare >.

Definition at line 462 of file flat_multimap.h.

iterator upper_bound ( key_parameter_t  key )

Finds the upper bound of a key.

Parameters:
keyThe key to search for.
Returns:
An iterator.

Definition at line 410 of file flat_multimap.h.

const_iterator upper_bound ( key_parameter_t  key ) const

Finds the upper bound of a key.

Parameters:
keyThe key to search for.
Returns:
An iterator.

Definition at line 420 of file flat_multimap.h.

const_iterator upper_bound ( key_parameter_t  key ) const [inherited]

Finds the upper bound of a key.

Parameters:
keyThe key to search for.
Returns:
An iterator.

Definition at line 643 of file reference_flat_multimap.h.

iterator upper_bound ( key_parameter_t  key ) [inherited]

Finds the upper bound of a key.

Parameters:
keyThe key to search for.
Returns:
An iterator.

Definition at line 633 of file reference_flat_multimap.h.