Public Types |
typedef size_t | size_type |
| The type used for determining the size of map.
|
Public Member Functions |
| map () |
| Default constructor.
|
| map (const map &other) |
| Copy constructor.
|
template<typename TIterator > |
| map (TIterator first, TIterator last) |
| Constructor, from an iterator range.
|
| ~map () |
| Destructor.
|
map & | operator= (const map &rhs) |
| Assignment operator.
|
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_type & | operator[] (key_parameter_t key) |
| Returns a reference to the value at index 'key'.
|
mapped_type & | at (key_parameter_t key) |
| Returns a reference to the value at index 'key' If asserts or exceptions are enabled, emits an etl::lookup_out_of_bounds if the key is not in the range.
|
const mapped_type & | at (key_parameter_t key) const |
| Returns a const reference to the value at index 'key' If asserts or exceptions are enabled, emits an etl::lookup_out_of_bounds if the key is not in the range.
|
void | assign (TIterator first, TIterator last) |
| Assigns values to the map.
|
void | clear () |
| Clears the map.
|
size_type | count (key_parameter_t key) const |
| Counts the number of elements that contain the key specified.
|
std::pair< iterator, iterator > | equal_range (key_parameter_t key) |
| Returns two iterators with bounding (lower bound, upper bound) the key provided.
|
std::pair< const_iterator,
const_iterator > | equal_range (key_parameter_t key) const |
| Returns two const iterators with bounding (lower bound, upper bound) the key provided.
|
void | erase (iterator position) |
| Erases the value at the specified position.
|
iterator | erase (const_iterator position) |
| Erases the value at the specified position.
|
iterator | erase (iterator first, iterator last) |
| Erases a range of elements.
|
iterator | erase (const_iterator first, const_iterator last) |
| Erases a range of elements.
|
iterator | find (key_parameter_t key) |
| Finds an element.
|
const_iterator | find (key_parameter_t key) const |
| Finds an element.
|
std::pair< iterator, bool > | insert (const value_type &value) |
| Inserts a value to the map.
|
iterator | insert (iterator, const value_type &value) |
| Inserts a value to the map starting at the position recommended.
|
iterator | insert (const_iterator, const value_type &value) |
| Inserts a value to the map starting at the position recommended.
|
void | insert (TIterator first, TIterator last) |
| Inserts a range of values to the map.
|
iterator | lower_bound (key_parameter_t key) |
| Returns an iterator pointing to the first element in the container whose key is not considered to go before the key provided or end() if all keys are considered to go before the key provided.
|
const_iterator | lower_bound (key_parameter_t key) const |
| Returns a const_iterator pointing to the first element in the container whose key is not considered to go before the key provided or end() if all keys are considered to go before the key provided.
|
iterator | upper_bound (key_parameter_t key) |
| Returns an iterator pointing to the first element in the container whose key is not considered to go after the key provided or end() if all keys are considered to go after the key provided.
|
const_iterator | upper_bound (key_parameter_t key) const |
| Returns a const_iterator pointing to the first element in the container whose key is not considered to go after the key provided or end() if all keys are considered to go after the key provided.
|
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 |
| Returns the capacity of the vector.
|
size_t | available () const |
| Returns the remaining capacity.
|
Protected Types |
typedef etl::parameter_type
< TKey >::type | key_parameter_t |
| Defines the key value parameter type.
|
Protected Member Functions |
bool | node_comp (const Data_Node &node1, const Data_Node &node2) const |
| How to compare node elements.
|
void | initialise () |
| Initialise the map.
|
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 |
| Find the node whose key would go before all the other keys from the position provided.
|
const Node * | find_limit_node (const Node *position, const int8_t dir) const |
| Find the node whose key would go before all the other keys from the position provided.
|
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 |
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.
|