Struct ServiceKey
Defined in File fragment_service.hpp
-
struct ServiceKey
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.
Public Functions
-
inline bool operator==(const ServiceKey &other) const noexcept
Equality comparison operator.
Two ServiceKeys are equal if both their type and id match.
- Parameters
other – The ServiceKey to compare with.
- Returns
true if the keys are equal, false otherwise.
Public Members
-
std::type_index type
Type information of the service.
-
std::string id
Service identifier (empty string indicates default instance)
-
inline bool operator==(const ServiceKey &other) const noexcept