Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
multimap_base Class Reference
[map]
The base class for all maps. More...
#include <multimap.h>
Inherited by imultimap< TKey, TMapped, TKeyCompare >, and imultimap< TKey, TValue, TCompare >.
Data Structures | |
struct | Node |
The node element in the multimap. More... | |
Public Types | |
typedef size_t | size_type |
The type used for determining the size of map. | |
Public Member Functions | |
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 Member Functions | |
multimap_base (size_type max_size_) | |
The constructor that is called from derived classes. | |
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. | |
void | next_node (Node *&position) const |
Find the next node in sequence from the node provided. | |
void | next_node (const Node *&position) const |
Find the next node in sequence from the node provided. | |
void | prev_node (Node *&position) const |
Find the previous node in sequence from the node provided. | |
void | prev_node (const Node *&position) const |
Find the previous node in sequence from the node provided. | |
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. | |
void | attach_node (Node *parent, 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 multimap root. |
Detailed Description
The base class for all maps.
Definition at line 123 of file multimap.h.
Member Typedef Documentation
typedef size_t size_type |
The type used for determining the size of map.
Reimplemented in imultimap< TKey, TMapped, TKeyCompare >, and imultimap< TKey, TValue, TCompare >.
Definition at line 127 of file multimap.h.
Constructor & Destructor Documentation
multimap_base | ( | size_type | max_size_ ) | [protected] |
The constructor that is called from derived classes.
Definition at line 223 of file multimap.h.
Member Function Documentation
Attach the provided node to the position provided.
Definition at line 551 of file multimap.h.
size_t available | ( | ) | const |
Returns the remaining capacity.
- Returns:
- The remaining capacity.
Definition at line 174 of file multimap.h.
void balance_node | ( | Node *& | critical_node ) | [protected] |
Balance the critical node at the position provided as needed.
Definition at line 234 of file multimap.h.
size_type capacity | ( | ) | const |
Returns the capacity of the vector.
- Returns:
- The capacity of the vector.
Definition at line 165 of file multimap.h.
Detach the node at the position provided.
Definition at line 569 of file multimap.h.
bool empty | ( | ) | const |
Checks to see if the map is empty.
Definition at line 148 of file multimap.h.
Find the node whose key would go before all the other keys from the position provided.
Definition at line 535 of file multimap.h.
bool full | ( | ) | const |
Checks to see if the map is full.
Definition at line 156 of file multimap.h.
size_type max_size | ( | ) | const |
Gets the maximum possible size of the map.
Definition at line 140 of file multimap.h.
void next_node | ( | Node *& | position ) | const [protected] |
Find the next node in sequence from the node provided.
Definition at line 394 of file multimap.h.
void next_node | ( | const Node *& | position ) | const [protected] |
Find the next node in sequence from the node provided.
Definition at line 426 of file multimap.h.
void prev_node | ( | const Node *& | position ) | const [protected] |
Find the previous node in sequence from the node provided.
Definition at line 496 of file multimap.h.
void prev_node | ( | Node *& | position ) | const [protected] |
Find the previous node in sequence from the node provided.
Definition at line 458 of file multimap.h.
void rotate_2node | ( | Node *& | position, |
uint_least8_t | dir | ||
) | [protected] |
Rotate two nodes at the position provided the to balance the tree.
Definition at line 297 of file multimap.h.
void rotate_3node | ( | Node *& | position, |
uint_least8_t | dir, | ||
uint_least8_t | third | ||
) | [protected] |
Rotate three nodes at the position provided the to balance the tree.
Definition at line 338 of file multimap.h.
size_type size | ( | ) | const |
Gets the size of the map.
Definition at line 132 of file multimap.h.
Field Documentation
The maximum size of the map.
Definition at line 600 of file multimap.h.
size_type current_size [protected] |
The number of the used nodes.
Definition at line 599 of file multimap.h.
The node that acts as the multimap root.
Definition at line 601 of file multimap.h.
Generated on Tue Jul 12 2022 14:05:52 by
