casa
5.7.0-16
|
MapWithDefault adds a default value to the std::map class. This default value is used by the [] operator when the key is not already known. More...
#include <MapWithDefault.h>
Public Member Functions | |
MapWithDefault (const V &defaultValue) | |
creates a std::map with the associated specified defaultt value More... | |
MapWithDefault (const MapWithDefault< K, V > &other) | |
creates a map with default from another one; use copy semantics. More... | |
~MapWithDefault () | |
Removes a map with default. More... | |
MapWithDefault< K, V > & | operator= (const MapWithDefault< K, V > &other) |
Assigns this map with default to another one; copy semantics. More... | |
V & | operator[] (const K &key) |
this is the specialization which uses the default value as necessary. More... | |
Private Attributes | |
V | defaultVal |
MapWithDefault adds a default value to the std::map class. This default value is used by the [] operator when the key is not already known.
<visibility=export>
Definition at line 54 of file MapWithDefault.h.
|
inline |
creates a std::map with the associated specified defaultt value
Definition at line 58 of file MapWithDefault.h.
|
inline |
creates a map with default from another one; use copy semantics.
Definition at line 61 of file MapWithDefault.h.
|
inline |
Removes a map with default.
Definition at line 64 of file MapWithDefault.h.
|
inline |
Assigns this map with default to another one; copy semantics.
Definition at line 78 of file MapWithDefault.h.
References casacore::operator=().
|
inline |
this is the specialization which uses the default value as necessary.
If the map from the key to a value is not defined a mapping will be defined from the key to the default value.
Definition at line 87 of file MapWithDefault.h.
|
private |
Definition at line 75 of file MapWithDefault.h.