RTC Toolkit 6.0.0
Loading...
Searching...
No Matches
repositoryFactory.hpp
Go to the documentation of this file.
1
11
12#ifndef RTCTK_COMPONENTFRAMEWORK_REPOSITORYFACTORY_HPP
13#define RTCTK_COMPONENTFRAMEWORK_REPOSITORYFACTORY_HPP
14
15#include <memory>
16
17#include <mal/utility/Uri.hpp>
18
20
22
49template <class BaseIf, class Adapter>
51public:
52 RepositoryFactory() = default;
53 ~RepositoryFactory() override = default;
54
61 bool CanHandle(const elt::mal::Uri& uri) const override;
62
71 std::unique_ptr<BaseIf> CreateInstance(const elt::mal::Uri& uri) const override;
72};
73
74} // namespace rtctk::componentFramework
75
77
78#endif // RTCTK_COMPONENTFRAMEWORK_REPOSITORYFACTORY_HPP
A simple registry of various factory objects.
Definition factoryRegistry.hpp:46
bool CanHandle(const elt::mal::Uri &uri) const override
Check if this repository factory is compatible with the given URI.
Definition repositoryFactory.ipp:22
std::unique_ptr< BaseIf > CreateInstance(const elt::mal::Uri &uri) const override
Create a new adapter instance to access the repository specified by the given URI.
Definition repositoryFactory.ipp:36
Header file for FactoryRegistry and related helper classes.
Definition commandReplier.cpp:21
Implementation file for RepositoryFactory.