|
RTC Toolkit 5.1.0
|
The base class for all factory objects that are registered in the FactoryRegistry. More...
#include <factoryRegistry.hpp>
Public Types | |
| using | AdapterIdType = typename BaseIf::AdapterIdType |
Public Member Functions | |
| 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. | |
The base class for all factory objects that are registered in the FactoryRegistry.
A factory deriving from this class will create new instances of a specific service adapter in CreateInstance to handle the service identifiers it recognises as compatible in CanHandle.
| using rtctk::componentFramework::FactoryRegistry< BaseIf >::FactoryIf::AdapterIdType = typename BaseIf::AdapterIdType |
|
default |
|
virtualdefault |
|
pure virtual |
Check if this factory is compatible with the given service identifier.
A compatible factory means that it is able to create new adapter instances for the given service identifier.
| [in] | id | The service identifier to check for compatibility. |
|
pure virtual |
Create a new adapter instance to access the service specified by the given identifier.
| [in] | id | The identifier to the service. |
| RtctkException | An exception deriving from RtctkException, and possibly nested, will be thrown if this method failed to create a new instance. |