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

UI Delegate Factories are responsible for instantiating classes that derive from UIDelegateInterface for use within a host. More...

#include <UIDelegateImplementationFactoryInterface.hpp>

Inheritance diagram for UIDelegateImplementationFactoryInterface:

Public Types

using Ptr = UIDelegateImplementationFactoryInterfacePtr
 
using ConstPtr = UIDelegateImplementationFactoryInterfaceConstPtr
 

Public Member Functions

 UIDelegateImplementationFactoryInterface (log::LoggerInterfacePtr logger)
 Construct an instance of this class. More...
 
virtual ~UIDelegateImplementationFactoryInterface ()
 Defaulted polymorphic destructor. More...
 
virtual Identifiers identifiers ()=0
 All identifiers known to the factory. More...
 
virtual managerApi::UIDelegateInterfacePtr instantiate (const Identifier &identifier)=0
 Creates an instance of the UIDelegateInterface with the specified identifier. More...
 

Protected Member Functions

const log::LoggerInterfacePtrlogger () const
 Get logger instance. More...
 

Detailed Description

UI Delegate Factories are responsible for instantiating classes that derive from UIDelegateInterface for use within a host.

UIDelegateImplementationFactoryInterface 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::UIDelegateInterfacePtr instantiate ( const Identifier identifier)
pure virtual

Creates an instance of the UIDelegateInterface with the specified identifier.

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

Implemented in CppPluginSystemUIDelegateImplementationFactory, and HybridPluginSystemUIDelegateImplementationFactory.

const log::LoggerInterfacePtr& logger ( ) const
protected

Get logger instance.


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