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

A factory to manage CppPluginSystemUIDelegatePlugin derived plugins. More...

#include <CppPluginSystemUIDelegateImplementationFactory.hpp>

Inheritance diagram for CppPluginSystemUIDelegateImplementationFactory:

Public Types

using Ptr = CppPluginSystemUIDelegateImplementationFactoryPtr
 
using ConstPtr = CppPluginSystemUIDelegateImplementationFactoryConstPtr
 
- Public Types inherited from UIDelegateImplementationFactoryInterface
using Ptr = UIDelegateImplementationFactoryInterfacePtr
 
using ConstPtr = UIDelegateImplementationFactoryInterfaceConstPtr
 

Public Member Functions

Identifiers identifiers () override
 Get a list of all manager plugin identifiers known to the factory. More...
 
managerApi::UIDelegateInterfacePtr instantiate (const Identifier &identifier) override
 Create an instance of the UIDelegateInterface with the specified identifier. More...
 
- Public Member Functions inherited from UIDelegateImplementationFactoryInterface
 UIDelegateImplementationFactoryInterface (log::LoggerInterfacePtr logger)
 Construct an instance of this class. More...
 
virtual ~UIDelegateImplementationFactoryInterface ()
 Defaulted polymorphic destructor. More...
 

Static Public Member Functions

static CppPluginSystemUIDelegateImplementationFactoryPtr make (log::LoggerInterfacePtr logger)
 Construct a new instance. More...
 
static Ptr make (openassetio::Str paths, log::LoggerInterfacePtr logger)
 Construct a new instance. More...
 

Static Public Attributes

static constexpr std::string_view kPluginEnvVar = "OPENASSETIO_UI_PLUGIN_PATH"
 Environment variable to read the plugin search path from. More...
 
static constexpr std::string_view kModuleHookName = "openassetioUIPlugin"
 Name of entry point function to locate within discovered paths. More...
 

Additional Inherited Members

- Protected Member Functions inherited from UIDelegateImplementationFactoryInterface
const log::LoggerInterfacePtrlogger () const
 Get logger instance. More...
 

Detailed Description

A factory to manage CppPluginSystemUIDelegatePlugin derived plugins.

This class is not usually used directly by a host, which instead uses the UIDelegateFactory.

The factory loads plugins found under paths specified in the OPENASSETIO_UI_PLUGIN_PATH env var.

Environment Variables:
OPENASSETIO_UI_PLUGIN_PATH str A PATH-style list of directories to search for CppPluginSystemUIDelegatePlugin based plugins. It uses the platform-native delimiter. Searched left to right. Note that this environment variable is also used by the PythonPluginSystemUIDelegateImplementationFactory.

Plugins are scanned and loaded lazily when required. In particular, this means no plugin scanning is done on construction.

See also
CppPluginSystem
CppPluginSystemUIDelegatePlugin

Member Typedef Documentation

Member Function Documentation

Identifiers identifiers ( )
overridevirtual

Get a list of all manager plugin identifiers known to the factory.

Returns
List of known manager plugin identifiers.

Implements UIDelegateImplementationFactoryInterface.

managerApi::UIDelegateInterfacePtr instantiate ( const Identifier identifier)
overridevirtual

Create an instance of the UIDelegateInterface with the specified identifier.

Parameters
identifierIdentifier of the UIDelegateInterface to instantiate.
Returns
Newly created interface.
Exceptions
InputValidationExceptionif the requested identifier has not been registered as a manager plugin.

Implements UIDelegateImplementationFactoryInterface.

Construct a new instance.

Plugin search path(s) will be taken from the kPluginEnvVar environment variable.

Parameters
loggerLogger for progress and warnings.
Returns
New instance.
static Ptr make ( openassetio::Str  paths,
log::LoggerInterfacePtr  logger 
)
static

Construct a new instance.

The kPluginEnvVar environment variable will be ignored.

Parameters
pathsPlugin search paths.
loggerLogger for progress and warnings.
Returns
New instance.

Member Data Documentation

constexpr std::string_view kModuleHookName = "openassetioUIPlugin"
static

Name of entry point function to locate within discovered paths.

constexpr std::string_view kPluginEnvVar = "OPENASSETIO_UI_PLUGIN_PATH"
static

Environment variable to read the plugin search path from.


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