Stefan Scholz / ETL
Embed: (wiki syntax)

« Back to documentation index

iflat_multiset< T, TKeyCompare > Class Template Reference

iflat_multiset< T, TKeyCompare > Class Template Reference
[flat_multiset]

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

#include <flat_multiset.h>

Inherits etl::ireference_flat_multiset< T, TKeyCompare >.

Public Member Functions

iterator begin ()
 Returns an iterator to the beginning of the flat_multiset.
const_iterator begin () const
 Returns a const_iterator to the beginning of the flat_multiset.
iterator end ()
 Returns an iterator to the end of the flat_multiset.
const_iterator end () const
 Returns a const_iterator to the end of the flat_multiset.
const_iterator cbegin () const
 Returns a const_iterator to the beginning of the flat_multiset.
const_iterator cend () const
 Returns a const_iterator to the end of the flat_multiset.
reverse_iterator rbegin ()
 Returns an reverse iterator to the reverse beginning of the flat_multiset.
const_reverse_iterator rbegin () const
 Returns a const reverse iterator to the reverse beginning of the flat_multiset.
reverse_iterator rend ()
 Returns a reverse iterator to the end + 1 of the flat_multiset.
const_reverse_iterator rend () const
 Returns a const reverse iterator to the end + 1 of the flat_multiset.
const_reverse_iterator crbegin () const
 Returns a const reverse iterator to the reverse beginning of the flat_multiset.
const_reverse_iterator crend () const
 Returns a const reverse iterator to the end + 1 of the flat_multiset.
template<typename TIterator >
void assign (TIterator first, TIterator last)
 Assigns values to the flat_multiset.
std::pair< iterator, bool > insert (parameter_t value)
 Inserts a value to the flat_multiset.
iterator insert (iterator position, parameter_t value)
 Inserts a value to the flat_multiset.
template<class TIterator >
void insert (TIterator first, TIterator last)
 Inserts a range of values to the flat_multiset.
size_t erase (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_multiset.
iterator find (parameter_t key)
 Finds an element.
const_iterator find (parameter_t key) const
 Finds an element.
size_t count (parameter_t key) const
 Counts an element.
iterator lower_bound (parameter_t key)
 Finds the lower bound of a key.
const_iterator lower_bound (parameter_t key) const
 Finds the lower bound of a key.
iterator upper_bound (parameter_t key)
 Finds the upper bound of a key.
const_iterator upper_bound (parameter_t key) const
 Finds the upper bound of a key.
std::pair< iterator, iterator > equal_range (parameter_t key)
 Finds the range of equal elements of a key.
std::pair< const_iterator,
const_iterator > 
equal_range (parameter_t key) const
 Finds the range of equal elements of a key.
iflat_multisetoperator= (const iflat_multiset &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.

Protected Member Functions

 iflat_multiset (lookup_t &lookup_, storage_t &storage_)
 Constructor.

Private Member Functions

std::pair< iterator, bool > insert (value_type &value)
 Inserts a value to the reference_flat_multiset.
iterator insert (iterator position, value_type &value)
 Inserts a value to the reference_flat_multiset.
size_t erase (parameter_t key)
 Erases an element.
iterator find (parameter_t key)
 Finds an element.
const_iterator find (parameter_t key) const
 Finds an element.
size_t count (parameter_t key) const
 Counts an element.
iterator lower_bound (parameter_t key)
 Finds the lower bound of a key.
const_iterator lower_bound (parameter_t key) const
 Finds the lower bound of a key.
iterator upper_bound (parameter_t key)
 Finds the upper bound of a key.
const_iterator upper_bound (parameter_t key) const
 Finds the upper bound of a key.
std::pair< iterator, iterator > equal_range (parameter_t key)
 Finds the range of equal elements of a key.
std::pair< const_iterator,
const_iterator > 
equal_range (parameter_t key) const
 Finds the range of equal elements of a key.
std::pair< iterator, bool > insert_at (iterator i_element, reference value)
 Inserts a value to the reference_flat_set.

Detailed Description

template<typename T, typename TKeyCompare = std::less<T>>
class etl::iflat_multiset< T, TKeyCompare >

The base class for specifically sized flat_multisets.

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

Definition at line 57 of file flat_multiset.h.


Constructor & Destructor Documentation

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

Constructor.

Definition at line 495 of file flat_multiset.h.


Member Function Documentation

void assign ( TIterator  first,
TIterator  last 
)

Assigns values to the flat_multiset.

If asserts or exceptions are enabled, emits flat_multiset_full if the flat_multiset does not have enough free space. If asserts or exceptions are enabled, emits flat_multiset_iterator if the iterators are reversed.

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

Reimplemented from ireference_flat_multiset< T, TKeyCompare >.

Definition at line 205 of file flat_multiset.h.

size_t available (  ) const

Returns the remaining capacity.

Returns:
The remaining capacity.

Reimplemented from ireference_flat_multiset< T, TKeyCompare >.

Definition at line 485 of file flat_multiset.h.

const_iterator begin (  ) const

Returns a const_iterator to the beginning of the flat_multiset.

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

Reimplemented from ireference_flat_multiset< T, TKeyCompare >.

Definition at line 102 of file flat_multiset.h.

iterator begin (  )

Returns an iterator to the beginning of the flat_multiset.

Returns:
An iterator to the beginning of the flat_multiset.

Reimplemented from ireference_flat_multiset< T, TKeyCompare >.

Definition at line 93 of file flat_multiset.h.

size_type capacity (  ) const

Returns the capacity of the flat_multiset.

Returns:
The capacity of the flat_multiset.

Reimplemented from ireference_flat_multiset< T, TKeyCompare >.

Definition at line 467 of file flat_multiset.h.

const_iterator cbegin (  ) const

Returns a const_iterator to the beginning of the flat_multiset.

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

Reimplemented from ireference_flat_multiset< T, TKeyCompare >.

Definition at line 129 of file flat_multiset.h.

const_iterator cend (  ) const

Returns a const_iterator to the end of the flat_multiset.

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

Reimplemented from ireference_flat_multiset< T, TKeyCompare >.

Definition at line 138 of file flat_multiset.h.

void clear (  )

Clears the flat_multiset.

Reimplemented from ireference_flat_multiset< T, TKeyCompare >.

Definition at line 328 of file flat_multiset.h.

size_t count ( parameter_t  key ) const

Counts an element.

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

Definition at line 358 of file flat_multiset.h.

const_reverse_iterator crbegin (  ) const

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

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

Reimplemented from ireference_flat_multiset< T, TKeyCompare >.

Definition at line 183 of file flat_multiset.h.

const_reverse_iterator crend (  ) const

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

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

Reimplemented from ireference_flat_multiset< T, TKeyCompare >.

Definition at line 192 of file flat_multiset.h.

bool empty (  ) const

Checks the 'empty' state of the flat_multiset.

Returns:
true if empty.

Reimplemented from ireference_flat_multiset< T, TKeyCompare >.

Definition at line 449 of file flat_multiset.h.

const_iterator end (  ) const

Returns a const_iterator to the end of the flat_multiset.

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

Reimplemented from ireference_flat_multiset< T, TKeyCompare >.

Definition at line 120 of file flat_multiset.h.

iterator end (  )

Returns an iterator to the end of the flat_multiset.

Returns:
An iterator to the end of the flat_multiset.

Reimplemented from ireference_flat_multiset< T, TKeyCompare >.

Definition at line 111 of file flat_multiset.h.

std::pair<iterator, iterator> equal_range ( 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 408 of file flat_multiset.h.

std::pair<const_iterator, const_iterator> equal_range ( 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 418 of file flat_multiset.h.

size_t erase ( parameter_t  key )

Erases an element.

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

Definition at line 275 of file flat_multiset.h.

void erase ( iterator  i_element )

Erases an element.

Parameters:
i_elementIterator to the element.

Reimplemented from ireference_flat_multiset< T, TKeyCompare >.

Definition at line 295 of file flat_multiset.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_multiset< T, TKeyCompare >.

Definition at line 310 of file flat_multiset.h.

iterator find ( 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 338 of file flat_multiset.h.

const_iterator find ( 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 348 of file flat_multiset.h.

bool full (  ) const

Checks the 'full' state of the flat_multiset.

Returns:
true if full.

Reimplemented from ireference_flat_multiset< T, TKeyCompare >.

Definition at line 458 of file flat_multiset.h.

void insert ( TIterator  first,
TIterator  last 
)

Inserts a range of values to the flat_multiset.

If asserts or exceptions are enabled, emits flat_multiset_full if the flat_multiset 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_multiset< T, TKeyCompare >.

Definition at line 262 of file flat_multiset.h.

std::pair<iterator, bool> insert ( parameter_t  value )

Inserts a value to the flat_multiset.

If asserts or exceptions are enabled, emits flat_multiset_full if the flat_multiset is already full.

Parameters:
valueThe value to insert.

Definition at line 225 of file flat_multiset.h.

iterator insert ( iterator  position,
parameter_t  value 
)

Inserts a value to the flat_multiset.

If asserts or exceptions are enabled, emits flat_multiset_full if the flat_multiset is already full.

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

Definition at line 249 of file flat_multiset.h.

iterator lower_bound ( parameter_t  key )

Finds the lower bound of a key.

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

Definition at line 368 of file flat_multiset.h.

const_iterator lower_bound ( parameter_t  key ) const

Finds the lower bound of a key.

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

Definition at line 378 of file flat_multiset.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_multiset< T, TKeyCompare >.

Definition at line 476 of file flat_multiset.h.

iflat_multiset& operator= ( const iflat_multiset< T, TKeyCompare > &  rhs )

Assignment operator.

Definition at line 426 of file flat_multiset.h.

const_reverse_iterator rbegin (  ) const

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

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

Reimplemented from ireference_flat_multiset< T, TKeyCompare >.

Definition at line 156 of file flat_multiset.h.

reverse_iterator rbegin (  )

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

Returns:
Iterator to the reverse beginning of the flat_multiset.

Reimplemented from ireference_flat_multiset< T, TKeyCompare >.

Definition at line 147 of file flat_multiset.h.

reverse_iterator rend (  )

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

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

Reimplemented from ireference_flat_multiset< T, TKeyCompare >.

Definition at line 165 of file flat_multiset.h.

const_reverse_iterator rend (  ) const

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

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

Reimplemented from ireference_flat_multiset< T, TKeyCompare >.

Definition at line 174 of file flat_multiset.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_multiset< T, TKeyCompare >.

Definition at line 440 of file flat_multiset.h.

iterator upper_bound ( parameter_t  key )

Finds the upper bound of a key.

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

Definition at line 388 of file flat_multiset.h.

const_iterator upper_bound ( parameter_t  key ) const

Finds the upper bound of a key.

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

Definition at line 398 of file flat_multiset.h.