Function rcutils_hash_map_get_size
Defined in File hash_map.h
Function Documentation
-
rcutils_ret_t rcutils_hash_map_get_size(const rcutils_hash_map_t *hash_map, size_t *size)
Get the current size of the hash_map.
This function will return the internal size of the hash_map, which is the current number of key value pairs in the hash_map. The size is changed when calling rcutils_hash_map_set() or rcutils_hash_map_unset().
Attribute
Adherence
Allocates Memory
No
Thread-Safe
No
Uses Atomics
No
Lock-Free
Yes
- Parameters:
hash_map – [in] rcutils_hash_map_t to be queried
size – [out] size of the hash_map
- Returns:
RCUTILS_RET_OK if successful, or
- Returns:
RCUTILS_RET_INVALID_ARGUMENT for invalid arguments, or
- Returns:
RCUTILS_RET_NOT_INITIALIZED if the hash_map is invalid, or
- Returns:
RCUTILS_RET_ERROR if an unknown error occurs.