Function rcutils_string_map_get_size

Function Documentation

rcutils_ret_t rcutils_string_map_get_size(const rcutils_string_map_t *string_map, size_t *size)

Get the current size of the string map.

This function will return the internal size of the map, which is the current number of key value pairs in the map. The size is changed when calling rcutils_string_map_set_no_resize(), rcutils_string_map_set(), or rcutils_string_map_unset().

Parameters:
  • string_map[in] rcutils_string_map_t to be queried

  • size[out] size of the string map

Returns:

RCUTILS_RET_OK if successful, or

Returns:

RCUTILS_RET_INVALID_ARGUMENT for invalid arguments, or

Returns:

RCUTILS_RET_STRING_MAP_INVALID if the string map is invalid, or

Returns:

RCUTILS_RET_ERROR if an unknown error occurs.