|
SPH
|
#include <UnorderedMap.h>
Classes | |
| struct | Element |
| Element of the container. More... | |
Public Member Functions | |
| UnorderedMap ()=default | |
| UnorderedMap (std::initializer_list< Element > list) | |
| Constructs the map fromm initializer list of elements. More... | |
| INLINE TValue & | operator[] (const TKey &key) |
| Returns a reference to the element, given its key. More... | |
| INLINE const TValue & | operator[] (const TKey &key) const |
| Returns a reference to the element, given its key. More... | |
| INLINE TValue & | insert (const TKey &key, const TValue &value) |
| Adds a new element into the map or sets new value of element with the same key. More... | |
| INLINE TValue & | insert (const TKey &key, TValue &&value) |
| Adds a new element into the map or sets new value of element with the same key. More... | |
| INLINE void | remove (const TKey &key) |
| Removes element with given key from the map. More... | |
| INLINE bool | tryRemove (const TKey &key) |
| Removes element with given key if present, otherwise it does nothing. More... | |
| INLINE void | clear () |
| Removes all elements from the map. More... | |
| INLINE Optional< TValue & > | tryGet (const TKey &key) |
| Returns a reference to the value matching the given key, or NOTHING if no such value exists. More... | |
| INLINE Optional< const TValue & > | tryGet (const TKey &key) const |
| Returns a reference to the value matching the given key, or NOTHING if no such value exists. More... | |
| INLINE bool | contains (const TKey &key) const |
| Returns true if the map contains element of given key. More... | |
| INLINE Size | size () const |
| Returns the number of elements in the map. More... | |
| INLINE Size | empty () const |
| Returns true if the map contains no elements, false otherwise. More... | |
| INLINE Iterator< Element > | begin () |
| Returns the iterator pointing to the first element. More... | |
| INLINE Iterator< const Element > | begin () const |
| Returns the iterator pointing to the first element. More... | |
| INLINE Iterator< Element > | end () |
| Returns the iterator pointing to the one-past-last element. More... | |
| INLINE Iterator< const Element > | end () const |
| Returns the iterator pointing to the one-past-last element. More... | |
| INLINE | operator ArrayView< Element > () |
| INLINE | operator ArrayView< const Element > () const |
| UnorderedMap | clone () const |
Public Member Functions inherited from Noncopyable | |
| Noncopyable ()=default | |
| Noncopyable (const Noncopyable &)=delete | |
| Noncopyable (Noncopyable &&)=default | |
| Noncopyable & | operator= (const Noncopyable &)=delete |
| Noncopyable & | operator= (Noncopyable &&)=default |
Definition at line 14 of file UnorderedMap.h.
|
default |
|
inline |
Constructs the map fromm initializer list of elements.
Definition at line 29 of file UnorderedMap.h.
|
inline |
Returns the iterator pointing to the first element.
Definition at line 141 of file UnorderedMap.h.
|
inline |
Returns the iterator pointing to the first element.
Definition at line 146 of file UnorderedMap.h.
|
inline |
Removes all elements from the map.
Definition at line 97 of file UnorderedMap.h.
|
inline |
Definition at line 168 of file UnorderedMap.h.
|
inline |
Returns true if the map contains element of given key.
Equivalent to bool(tryGet(key)).
Definition at line 126 of file UnorderedMap.h.
|
inline |
Returns true if the map contains no elements, false otherwise.
Definition at line 136 of file UnorderedMap.h.
|
inline |
Returns the iterator pointing to the one-past-last element.
Definition at line 151 of file UnorderedMap.h.
|
inline |
Returns the iterator pointing to the one-past-last element.
Definition at line 156 of file UnorderedMap.h.
|
inline |
Adds a new element into the map or sets new value of element with the same key.
Definition at line 51 of file UnorderedMap.h.
|
inline |
Adds a new element into the map or sets new value of element with the same key.
Definition at line 62 of file UnorderedMap.h.
|
inline |
Definition at line 164 of file UnorderedMap.h.
|
inline |
Definition at line 160 of file UnorderedMap.h.
|
inline |
Returns a reference to the element, given its key.
The element must exists in the map, checked by assert.
Definition at line 35 of file UnorderedMap.h.
|
inline |
Returns a reference to the element, given its key.
The element must exists in the map, checked by assert.
Definition at line 44 of file UnorderedMap.h.
|
inline |
Removes element with given key from the map.
The element must exists in the map, checked by assert.
Definition at line 75 of file UnorderedMap.h.
|
inline |
Returns the number of elements in the map.
Definition at line 131 of file UnorderedMap.h.
|
inline |
Returns a reference to the value matching the given key, or NOTHING if no such value exists.
Safe alternative to operator[].
Definition at line 104 of file UnorderedMap.h.
|
inline |
Returns a reference to the value matching the given key, or NOTHING if no such value exists.
Definition at line 114 of file UnorderedMap.h.
|
inline |
Removes element with given key if present, otherwise it does nothing.
Definition at line 85 of file UnorderedMap.h.