src/utils/objectstorage.h
/** Add/change mapping.
         * @param key Key of the mapping.
         * @param value Value of the mapping (must be non null).
         *
         * If the key is not in the mapping yet, associates it with the value
         * and puts to the mapping.
         * Otherwise update value of the previous mapping.
         * <br>
         * This method doesn't invalidate existing (if any) iterator pointing
         * to the association.
         *
         * @returns Value of the previous mapping or 0 if the key was inserted
         * to the mapping.
         */
Add/change mapping.
@param key Key of the mapping.
@param value Value of the mapping (must be non null).

If the key is not in the mapping yet, associates it with the value
and puts to the mapping.
Otherwise update value of the previous mapping.

This method doesn't invalidate existing (if any) iterator pointing
to the association.

@returns Value of the previous mapping or 0 if the key was inserted
to the mapping.
Add / change mapping . @param key Key of the mapping . @param value Value of the mapping ( must be non null ) . If the key is not in the mapping yet associates it with the value and puts to the mapping . Otherwise update value of the previous mapping . This method doesn ' t invalidate existing ( if any ) iterator pointing to the association . @returns Value of the previous mapping or 0 if the key was inserted to the mapping .
V put(K key, V value)
        {
                Iterator iter=mapping.find(key);
                if(iter==mapping.end())
                {
                        mapping.insert(Association(key, value));
                        return 0;
                }
                V old=iter->second;
                iter->second=value;
                return old;
        }
V put ( K key , V value ) { Iterator iter = mapping . find ( key ) ; if ( iter == mapping . end ( ) ) { mapping . insert ( Association ( key , value ) ) ; return 0 ; } V old = iter -> second ; iter -> second = value ; return old ; }
Add/change mapping.
Add / change mapping .
// try to find at first // sets new value for association // returns old value