Function rcutils_hash_map_key_exists

Function Documentation

bool rcutils_hash_map_key_exists(const rcutils_hash_map_t *hash_map, const void *key)

Get whether or not a key exists.

Returns true if the provided key exists in the hash_map or false if it does not or if the hash_map or key are invalid. In all cases no error message is set.

Attribute

Adherence

Allocates Memory

No

Thread-Safe

No

Uses Atomics

No

Lock-Free

Yes

Parameters:
  • hash_map[in] rcutils_hash_map_t to be searched

  • key[in] hash_map key, must be null terminated c string

Returns:

true if key is in the hash_map, or

Returns:

false if key is not in the hash_map, or

Returns:

false for invalid arguments, or

Returns:

false if the hash_map is invalid.