ObjectMap< K, V >::Value Class Reference
Class to provide safe access to mapped value. More...
#include <ObjectMap.h>
Public Member Functions | |
Value (ObjectMap< K, V > &map, const K &key) | |
const K & | getKey () const |
V * | getValue () const |
Value & | operator= (V *newValue) |
operator V* () const | |
V * | operator-> () const |
bool | remove () |
Remove this value from the map. More... | |
V * | extract () |
Get the value for a given key and remove it from the map, without destroying it. More... | |
Detailed Description
template<typename K, typename V>
class ObjectMap< K, V >::Value
Class to provide safe access to mapped value.
- Note
- ObjectMap
operator[]
returns one of these, which provides behaviour consistent with V*
Constructor & Destructor Documentation
◆ Value()
template<typename K, typename V>
|
inline |
Member Function Documentation
◆ extract()
template<typename K, typename V>
|
inline |
Get the value for a given key and remove it from the map, without destroying it.
- Return values
-
V*
- Note
- The returned object must be freed by the caller when no longer required
◆ getKey()
template<typename K, typename V>
|
inline |
◆ getValue()
template<typename K, typename V>
|
inline |
◆ operator V*()
template<typename K, typename V>
|
inline |
◆ operator->()
template<typename K, typename V>
|
inline |
◆ operator=()
◆ remove()
Remove this value from the map.
- Return values
-
bool true if the value was found and removed
The documentation for this class was generated from the following file: