Zen API

- Home
- Topics
- Types
- Files

All Classes Files Functions Variables Typedefs Friends Macros Modules Pages

#define kMap_RemoveT | ( |  | kMap_map,
|  |  | KPtr_key,
|  |  | KPtr_oldKey,
|  |  | VPtr_oldValue
| ) |  |
| related

Removes a key-value pair from the map, returning the old key and/or value.

For object-based keys or values, the old objects are not automatically disposed. In this case, use the oldKey and/or oldValue parameters to receive the previous object(s) and then dispose them.

A debug assertion will be raised if the size of the specified key or value type is not equal to the size of the collection key or value type, respectively.

Parameters

  kMap_map | Map object.
  KPtr_key | Pointer to key.
  KPtr_oldKey | Strongly-typed destination pointer to receive old key.
  VPtr_oldValue | Strongly-typed destination pointer to receive old value.

Returns
  kOK if removed; kERROR_NOT_FOUND if key not found.