#include </home/casse/Dev/elm/src/concepts.h>
template<class K, class T>
class elm::concept::Map< K, T >
This concept defines collections of items retrievable by an assigned key.
- Implemented by:
◆ get() [1/2]
Option<const T&> get |
( |
const K & |
key | ) |
const |
Get a value by its key.
- Parameters
-
key | Key to get the value for. |
- Returns
- The matching value.
◆ get() [2/2]
const T& get |
( |
const K & |
key, |
|
|
const T & |
def |
|
) |
| const |
Get a value by its key.
- Parameters
-
key | Key to get the value for. |
def | Default value to return if the key is not found. |
- Returns
- Found value or default value.
◆ hasKey()
bool hasKey |
( |
const K & |
key | ) |
const |
Test if the key is defined in the map.
- Parameters
-
- Returns
- True if the key is defined in the map, false else.
◆ keys()
Get the collection of keys.
◆ operator[]()
const T& operator[] |
( |
const K & |
k | ) |
const |
Get a value by its key.
- Parameters
-
- Returns
- Value for the key.
- Exceptions
-
◆ pairs()
Get the collection pairs (key, value).
The documentation for this class was generated from the following file: