OpenAssetIO
An abstract API for generalising interactions between a host application and an asset management system
|
Manager Factories are responsible for instantiating classes that derive from openassetio::v1::managerApi::ManagerInterface for use within a host. More...
#include <ManagerImplementationFactoryInterface.hpp>
Public Types | |
using | Ptr = ManagerImplementationFactoryInterfacePtr |
using | ConstPtr = ManagerImplementationFactoryInterfaceConstPtr |
Public Member Functions | |
ManagerImplementationFactoryInterface (log::LoggerInterfacePtr logger) | |
Construct an instance of this class. More... | |
virtual | ~ManagerImplementationFactoryInterface () |
Defaulted polymorphic destructor. More... | |
virtual Identifiers | identifiers ()=0 |
All identifiers known to the factory. More... | |
virtual managerApi::ManagerInterfacePtr | instantiate (const Identifier &identifier)=0 |
Creates an instance of the ManagerInterface with the specified identifier. More... | |
Protected Member Functions | |
const log::LoggerInterfacePtr & | logger () const |
Get logger instance. More... | |
Manager Factories are responsible for instantiating classes that derive from openassetio::v1::managerApi::ManagerInterface for use within a host.
ManagerImplementationFactoryInterface defines the abstract interface that any such factory must adopt.
Factories are expected to be lazy, so should be cheap to construct, and work to discover plugins should be done in identifiers / instantiate. Hence member functions are deliberately non-const.
There is no guarantee that any one member function will be called before another (for example, you cannot rely on identifiers being called before instantiate).
Implementations deriving from this class should use the provided logger to report any non-critical messages. For any critical failures exceptions should be thrown, and logging left up to the caller.
|
explicit |
Construct an instance of this class.
logger | Logger object that should be used for all logging by the factory. Obtainable in subclasses through logger. |
|
virtual |
Defaulted polymorphic destructor.
|
pure virtual |
All identifiers known to the factory.
Implemented in CppPluginSystemManagerImplementationFactory, and HybridPluginSystemManagerImplementationFactory.
|
pure virtual |
Creates an instance of the ManagerInterface with the specified identifier.
identifier | The identifier of the ManagerInterface to instantiate. |
ManagerInterface
. Implemented in CppPluginSystemManagerImplementationFactory, and HybridPluginSystemManagerImplementationFactory.
|
protected |
Get logger instance.
Copyright 2013-2023 The Foundry Visionmongers Ltd. OpenAssetIO is released under the Apache 2.0 License