holoscan::ServiceKey

Beta
View as Markdown

Key structure for service registry that combines type and identifier.

ServiceKey uniquely identifies a service in the fragment’s service registry by combining the type information with an optional string identifier. This allows multiple instances of the same service type to coexist with different identifiers.

#include <holoscan/fragment_service.hpp>

Methods

operator==

bool holoscan::ServiceKey::operator==(
const ServiceKey &other
) const noexcept

Equality comparison operator.

Two ServiceKeys are equal if both their type and id match.

Returns: true if the keys are equal, false otherwise.

Parameters

other
const ServiceKey &

The ServiceKey to compare with.


Member variables

NameTypeDescription
typestd::type_indexType information of the service.
idstd::stringService identifier (empty string indicates default instance).