26 #ifndef MS2ASDM_MAPWITHHDEFAULT_H
27 #define MS2ASDM_MAPWITHHDEFAULT_H
82 this->defaultVal = other->defaultVal;
89 if (this->count(key) == 0) {
90 std::map<K,V>::operator[](key) = this->defaultVal;
V & operator[](const K &key)
this is the specialization which uses the default value as necessary.
PtrHolder< T > & operator=(const PtrHolder< T > &other)
~MapWithDefault()
Removes a map with default.
MapWithDefault(const MapWithDefault< K, V > &other)
creates a map with default from another one; use copy semantics.
MapWithDefault adds a default value to the std::map class. This default value is used by the [] opera...
MapWithDefault< K, V > & operator=(const MapWithDefault< K, V > &other)
Assigns this map with default to another one; copy semantics.
void defaultValue(CStokesVector &v)
MapWithDefault(const V &defaultValue)
creates a std::map with the associated specified defaultt value