RTC Toolkit 5.1.0
Loading...
Searching...
No Matches
repositoryFactory.hpp
Go to the documentation of this file.
1
13#ifndef RTCTK_COMPONENTFRAMEWORK_REPOSITORYFACTORY_HPP
14#define RTCTK_COMPONENTFRAMEWORK_REPOSITORYFACTORY_HPP
15
16#include <memory>
17
18#include <mal/utility/Uri.hpp>
19
21
23
50template <class BaseIf, class Adapter>
51class RepositoryFactory : public FactoryRegistry<BaseIf>::FactoryIf {
52public:
53 RepositoryFactory() = default;
54 ~RepositoryFactory() override = default;
55
62 bool CanHandle(const elt::mal::Uri& uri) const override;
63
72 std::unique_ptr<BaseIf> CreateInstance(const elt::mal::Uri& uri) const override;
73};
74
75} // namespace rtctk::componentFramework
76
78
79#endif // RTCTK_COMPONENTFRAMEWORK_REPOSITORYFACTORY_HPP
A simple registry of various factory objects.
Definition factoryRegistry.hpp:47
A base class for factories that create instances of repository adapters from URIs.
Definition repositoryFactory.hpp:51
bool CanHandle(const elt::mal::Uri &uri) const override
Check if this repository factory is compatible with the given URI.
Definition repositoryFactory.ipp:23
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:37
Header file for FactoryRegistry and related helper classes.
Definition commandReplier.cpp:22
elt::mal::future< std::string > InjectReqRepEvent(StateMachineEngine &engine)
Definition malEventInjector.hpp:23
Implementation file for RepositoryFactory.