A map. More...
#include <map.h>
Public Types | |
using | map_type = std::map< Key, Value > |
Type of the map. | |
using | key_type = typename map_type::key_type |
Type of the key. | |
using | mapped_type = typename map_type::mapped_type |
Type of the mapped. | |
using | value_type = typename map_type::value_type |
Type of the value. | |
Public Member Functions | |
Vector< key_type > | get_keys () const |
Gets the keys. | |
Vector< mapped_type > | get_values () const |
Gets the values. | |
bool | is_key (const key_type &key) const |
Query if 'key' is key. | |
bool | is_value (const mapped_type &value) const |
Query if 'value' is value. | |
mapped_type | sumValues () const |
Calculates the sum of all values in the map. | |
void | print () const |
Prints this object. | |
std::string | toString () const |
Convert this object into a string representation. | |
A map.
Key | Type of the key. |
Value | Type of the value. |
using Map< Key, Value >::key_type = typename map_type::key_type |
Type of the key.
using Map< Key, Value >::map_type = std::map<Key, Value> |
Type of the map.
using Map< Key, Value >::mapped_type = typename map_type::mapped_type |
Type of the mapped.
using Map< Key, Value >::value_type = typename map_type::value_type |
Type of the value.
|
inline |
Gets the keys.
|
inline |
Gets the values.
|
inline |
Query if 'key' is key.
key | The key. |
|
inline |
Query if 'value' is value.
value | The value. |
|
inline |
Prints this object.
|
inline |
Calculates the sum of all values in the map.
|
inline |
Convert this object into a string representation.