OpenAssetIO
An abstract API for generalising interactions between a host application and an asset management system
ManagerImplementationFactoryInterface Class Referenceabstract

Manager Factories are responsible for instantiating classes that derive from openassetio::v1::managerApi::ManagerInterface for use within a host. More...

#include <ManagerImplementationFactoryInterface.hpp>

Inheritance diagram for ManagerImplementationFactoryInterface:

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::LoggerInterfacePtrlogger () const
 Get logger instance. More...
 

Detailed Description

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.

Member Typedef Documentation

Constructor & Destructor Documentation

Construct an instance of this class.

Parameters
loggerLogger object that should be used for all logging by the factory. Obtainable in subclasses through logger.

Defaulted polymorphic destructor.

Member Function Documentation

virtual Identifiers identifiers ( )
pure virtual
virtual managerApi::ManagerInterfacePtr instantiate ( const Identifier identifier)
pure virtual

Creates an instance of the ManagerInterface with the specified identifier.

Parameters
identifierThe identifier of the ManagerInterface to instantiate.
Returns
Newly created ManagerInterface.

Implemented in CppPluginSystemManagerImplementationFactory, and HybridPluginSystemManagerImplementationFactory.

const log::LoggerInterfacePtr& logger ( ) const
protected

Get logger instance.


The documentation for this class was generated from the following file:
  • /src/src/openassetio-core/include/openassetio/hostApi/ManagerImplementationFactoryInterface.hpp