Function rcutils_string_map_clear

Function Documentation

rcutils_ret_t rcutils_string_map_clear(rcutils_string_map_t *string_map)

Remove all key value pairs from the map.

This function will remove all key value pairs from the map, and it will reclaim all resources allocated as a result of setting key value pairs. rcutils_string_map_fini() should still be called after this.

Parameters:

string_map[inout] rcutils_string_map_t to be cleared

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.