#include <icy/collection.h>A keyed value store (values stored by copy, not pointer).
| Return | Name | Description |
|---|---|---|
KVCollection | Defaulted constructor. | |
bool | add inline | Inserts a value; returns false if key already exists. |
TValue & | get inline | Returns the value or throws. |
constTValue & | get const inline | Returns the value or defaultValue. |
bool | remove inline | |
bool | has const inline | |
bool | empty const inline | |
size_t | size const inline | |
void | clear inline | |
Map & | map inline | |
const Map & | map const inline |
KVCollection() = defaultDefaulted constructor.
inline
inline bool add(constTKey & key, constTValue & item)Inserts a value; returns false if key already exists.
inline
inline TValue & get(constTKey & key)Returns the value or throws.
const inline
inline constTValue & get(constTKey & key, constTValue & defaultValue) constReturns the value or defaultValue.
inline
inline bool remove(constTKey & key)const inline
inline bool has(constTKey & key) constconst inline
inline bool empty() constconst inline
inline size_t size() constinline
inline void clear()inline
inline Map & map()const inline
inline const Map & map() const| Return | Name | Description |
|---|---|---|
Map | _map |
Map _map| Name | Description |
|---|---|
Map |
std::map< TKey, TValue > Map()