* Remove a key-value entry from the XnHash * * @param key [in] The key of the entry * @param value [out] The value that was in the removed entry * @return XN_STATUS_NO_MATCH if no such key exists */
| 464 | * @return XN_STATUS_NO_MATCH if no such key exists |
| 465 | */ |
| 466 | XnStatus Remove(const XnKey& key, XnValue& value) |
| 467 | { |
| 468 | // find the entry to which the key belongs |
| 469 | Iterator hiter(this); |
| 470 | |
| 471 | XnStatus FindStatus = Find(key, hiter); |
| 472 | if (FindStatus != XN_STATUS_OK) |
| 473 | { |
| 474 | // no such entry! |
| 475 | return FindStatus; |
| 476 | } |
| 477 | |
| 478 | // Remove by iterator |
| 479 | value = hiter.Value(); |
| 480 | return Remove(hiter); |
| 481 | } |
| 482 | |
| 483 | /** |
| 484 | * Remove an entry from the XnHash by iterator |