|
RTC Toolkit 5.1.0
|
A base class for factories that create instances of repository adapters from URIs. More...
#include <repositoryFactory.hpp>
Public Member Functions | |
| RepositoryFactory ()=default | |
| ~RepositoryFactory () override=default | |
| bool | CanHandle (const elt::mal::Uri &uri) const override |
| Check if this repository factory is compatible with the given URI. | |
| 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. | |
Public Member Functions inherited from rtctk::componentFramework::FactoryRegistry< BaseIf >::FactoryIf | |
| FactoryIf ()=default | |
| virtual | ~FactoryIf ()=default |
| virtual bool | CanHandle (const AdapterIdType &id) const =0 |
| Check if this factory is compatible with the given service identifier. | |
| virtual std::unique_ptr< BaseIf > | CreateInstance (const AdapterIdType &id) const =0 |
| Create a new adapter instance to access the service specified by the given identifier. | |
Additional Inherited Members | |
Public Types inherited from rtctk::componentFramework::FactoryRegistry< BaseIf >::FactoryIf | |
| using | AdapterIdType = typename BaseIf::AdapterIdType |
A base class for factories that create instances of repository adapters from URIs.
This template class imposes the restriction that BaseIf has a type declaration for AdapterIdType that is equivalent to elt::mal::Uri. For example:
In addition, the Adapter class must declare the static class string member SUPPORTED_URI_SCHEME, which defines the URI scheme that the Adapter supports. For example:
| BaseIf | The abstract/base interface class for which this factory creates service adapter instances. |
| Adapter | The new instances will be created using the Adapter class. |
|
default |
|
overridedefault |
|
override |
Check if this repository factory is compatible with the given URI.
| [in] | uri | The URI to check for compatibility. |
|
override |
Create a new adapter instance to access the repository specified by the given URI.
| [in] | uri | The URI to the repository. |
| RtctkException | An exception deriving from RtctkException, and possibly nested, will be thrown if this method failed to create a new instance. |