Class FragmentServiceProvider
Defined in File fragment_service_provider.hpp
Derived Type
public holoscan::Fragment
(Class Fragment)
-
class FragmentServiceProvider
Interface for classes that can provide access to registered fragment services.
This interface is used by ComponentBase to decouple component service access from the concrete Fragment implementation, enabling better testability and modularity while still allowing service retrieval.
Subclassed by holoscan::Fragment
Public Functions
-
virtual ~FragmentServiceProvider() = default
-
virtual std::shared_ptr<FragmentService> get_service_erased(const std::type_info &service_type, std::string_view id) const = 0
Retrieves a service using type erasure.
- Parameters
service_type – The std::type_info of the service to retrieve.
id – The identifier of the service instance.
- Returns
A shared_ptr to FragmentService if found, otherwise nullptr.
-
virtual ~FragmentServiceProvider() = default