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.
map_base Class Reference
[map]
The base class for all maps. More...
#include <map.h>
Inherited by imap< TKey, TMapped, TKeyCompare >, and imap< TKey, TValue, TCompare >.
Data Structures | |
struct | Node |
The node element in the map. 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 | |
map_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. | |
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. |
Detailed Description
The base class for all maps.
Definition at line 125 of file map.h.
Member Typedef Documentation
typedef size_t size_type |
The type used for determining the size of map.
Reimplemented in imap< TKey, TMapped, TKeyCompare >, and imap< TKey, TValue, TCompare >.
Constructor & Destructor Documentation
Member Function Documentation
size_t available | ( | ) | const |
void balance_node | ( | Node *& | critical_node ) | [protected] |
size_type capacity | ( | ) | const |
size_type max_size | ( | ) | const |
void rotate_2node | ( | Node *& | position, |
uint_least8_t | dir | ||
) | [protected] |
void rotate_3node | ( | Node *& | position, |
uint_least8_t | dir, | ||
uint_least8_t | third | ||
) | [protected] |
Field Documentation
size_type current_size [protected] |
Generated on Tue Jul 12 2022 14:05:51 by
