OpenAssetIO
An abstract API for generalising interactions between a host application and an asset management system
|
The hybrid plugin system composes one or more child plugin systems, and abstracts away routing API calls based on priority and capability. More...
#include <HybridPluginSystemManagerImplementationFactory.hpp>
Public Types | |
using | ManagerImplementationFactoryInterfaces = std::vector< hostApi::ManagerImplementationFactoryInterfacePtr > |
using | Ptr = HybridPluginSystemManagerImplementationFactoryPtr |
using | ConstPtr = HybridPluginSystemManagerImplementationFactoryConstPtr |
![]() | |
using | Ptr = ManagerImplementationFactoryInterfacePtr |
using | ConstPtr = ManagerImplementationFactoryInterfaceConstPtr |
Public Member Functions | |
Identifiers | identifiers () override |
Get a list of all manager plugin identifiers known to all child factories. More... | |
managerApi::ManagerInterfacePtr | instantiate (const Identifier &identifier) override |
Create an instance of the ManagerInterface with the specified identifier. More... | |
![]() | |
ManagerImplementationFactoryInterface (log::LoggerInterfacePtr logger) | |
Construct an instance of this class. More... | |
virtual | ~ManagerImplementationFactoryInterface () |
Defaulted polymorphic destructor. More... | |
Static Public Member Functions | |
static HybridPluginSystemManagerImplementationFactoryPtr | make (ManagerImplementationFactoryInterfaces factories, log::LoggerInterfacePtr logger) |
Construct a new instance. More... | |
Additional Inherited Members | |
![]() | |
const log::LoggerInterfacePtr & | logger () const |
Get logger instance. More... | |
The hybrid plugin system composes one or more child plugin systems, and abstracts away routing API calls based on priority and capability.
A list of factories are provided in priority order. When a plugin with a particular identifier is requested, all factories are queried and any that return positively for the identifier have their resulting ManagerInterface instances composed into a single ManagerInterface
, such that API calls are dispatched to the appropriate child instance, based on priority and capability.
Manager plugins advertise their capabilities using ManagerInterface.hasCapability.
If multiple plugins support the same capability, then priority is given to the plugin corresponding to the earliest in the list of provided child factories.
using ManagerImplementationFactoryInterfaces = std::vector<hostApi::ManagerImplementationFactoryInterfacePtr> |
|
overridevirtual |
Get a list of all manager plugin identifiers known to all child factories.
Implements ManagerImplementationFactoryInterface.
|
overridevirtual |
Create an instance of the ManagerInterface with the specified identifier.
If multiple factories return a positive result for the identifier, composition is performed to create a single ManagerInterface that dispatches API calls to the appropriate child instance, based on advertised capability or priority order.
Note that, like any other plugin system, the returned ManagerInterface
cannot be used until initialized.
identifier | Identifier of the ManagerInterface to instantiate. |
InputValidationException | if the requested identifier has not been registered as a manager plugin. |
Implements ManagerImplementationFactoryInterface.
|
static |
Construct a new instance.
factories | List of factories to compose. |
logger | Logger for progress and warnings. |
Copyright 2013-2023 The Foundry Visionmongers Ltd. OpenAssetIO is released under the Apache 2.0 License