Exemplo n.º 1
0
inline void RefHashTableOf<TVal, THasher>::transferElement(const void* const key1, void* key2)
{
    put(key2, orphanKey(key1));
}
Exemplo n.º 2
0
// this function transfer the data from key1 to key2
// this is equivalent to calling
//  1.  get(key1) to retrieve the data,
//  2.  removeKey(key1),
//  3.  and then put(key2, data)
// except that the data is not deleted in "removeKey" even it is adopted so that it
// can be transferred to key2.
// whatever key2 has originally will be purged (if adopted)
template <class TElem> void RefHashTableOf<TElem>::transferElement(const void* const key1, void* key2)
{
    put(key2, orphanKey(key1));
}