The UIDelegateFactory is the primary mechanism for querying for available UI Delegate plugins and constructing instances of them.
More...
#include <UIDelegateFactory.hpp>
|
| struct | UIDelegateDetail |
| | Simple struct containing the default configuration details of a potential UI delegate implementation. More...
|
| |
|
| static UIDelegateFactoryPtr | make (HostInterfacePtr hostInterface, UIDelegateImplementationFactoryInterfacePtr uiDelegateImplementationFactory, log::LoggerInterfacePtr logger) |
| | Construct an instance of this class. More...
|
| |
| static UIDelegatePtr | createUIDelegateForInterface (const Identifier &identifier, const HostInterfacePtr &hostInterface, const UIDelegateImplementationFactoryInterfacePtr &uiDelegateImplementationFactory, const log::LoggerInterfacePtr &logger) |
| | Create a UIDelegate instance for the UI delegate associated with the given identifier. More...
|
| |
| static UIDelegatePtr | defaultUIDelegateForInterface (const HostInterfacePtr &hostInterface, const UIDelegateImplementationFactoryInterfacePtr &uiDelegateImplementationFactory, const log::LoggerInterfacePtr &logger) |
| | Creates the default UIDelegate as defined by the TOML configuration file referenced by the $OPENASSETIO_DEFAULT_CONFIG. More...
|
| |
| static UIDelegatePtr | defaultUIDelegateForInterface (std::string_view configPath, const HostInterfacePtr &hostInterface, const UIDelegateImplementationFactoryInterfacePtr &uiDelegateImplementationFactory, const log::LoggerInterfacePtr &logger) |
| | Creates the default UIDelegate as defined by the given TOML configuration file. More...
|
| |
The UIDelegateFactory is the primary mechanism for querying for available UI Delegate plugins and constructing instances of them.
The underlying UI delegate implementation is constructed using the supplied UIDelegateImplementationFactoryInterface factory implementation.
Hosts should never attempt to directly construct a UIDelegate class or interact with the implementation factory directly.
Mapping of UI delegate identifier to its configuration details.
Get the details for each available UI delegate as a map of UI delegate identifier to UI delegate details.
This provides the default settings that can be taken and mutated before being used in the initialization of a UIDelegate.
Additional UI delegate metadata is also included that may be useful. For example, this may be presented as part of a UI delegate picker widget.
- See also
- UIDelegateDetail
- Returns
- A UIDelegateDetail instance for each available UI delegate.
Create a UIDelegate instance for the UI delegate associated with the given identifier.
The instance returned should then be used for all interaction with the UI delegate.
- Parameters
-
| identifier | Unique UI delegate identifier. |
- Returns
- Newly instantiated UI delegate.
Create a UIDelegate instance for the UI delegate associated with the given identifier.
The instance returned should then be used for all interaction with the UI delegate.
- Parameters
-
| identifier | Unique UI delegate identifier. |
| hostInterface | The host's implementation of the HostInterface that uniquely identifies the host and provides common hooks for the UI delegate to query asset-related properties from the host. |
| uiDelegateImplementationFactory | The factory that will be used to instantiate the UI delegate. See, for example, PythonPluginSystemUIDelegateImplementationFactory. |
| logger | The logger instance that will be used for all messaging from the factory and instantiated UIDelegate instances. |
- Returns
- Newly instantiated UI delegate.
Creates the default UIDelegate as defined by the TOML configuration file referenced by the $OPENASSETIO_DEFAULT_CONFIG.
- Note
- This is the same environment variable that is used in the ManagerFactory. This means that if the config file location is specified by environment variable, then the same config file will be used to identify and configure both the manager plugin and UI delegate plugin.
- See also
- Alternative direct signature for more details.
- Parameters
-
| hostInterface | The host's implementation of the HostInterface that uniquely identifies the host and provides common hooks for the UI delegate to query asset-related properties from the host. |
| uiDelegateImplementationFactory | The factory that will be used to instantiate UI delegates. |
| logger | The logger instance that will be used for all messaging from the instantiated UIDelegate instances. |
- Returns
- A default-configured UI delegate if $OPENASSETIO_DEFAULT_CONFIG is set, otherwise a nullptr if the var was not set.
- Exceptions
-
Creates the default UIDelegate as defined by the given TOML configuration file.
This allows deployments to centralize OpenAssetIO manager and UI delegate settings, and for hosts to instantiate this UI delegate without the need for their own settings and persistence mechanism.
The referenced TOML file should have the following structure.
2 identifier = "some.identifier"
4 [ui.settings] # Optional
5 some_ui_setting = "value"
Any occurrences of ${config_dir} within TOML string values will be substituted with the absolute path to the directory containing the TOML file, before being passed on to the UI delegate settings.
- Parameters
-
| configPath | Path to the TOML config file, compatible with std::ifstream::open. Relative paths resolve to a platform/environment-dependent location. |
| hostInterface | The host's implementation of the HostInterface that uniquely identifies the host and provides common hooks for the UI delegate to query asset-related properties from the host. |
| uiDelegateImplementationFactory | The factory that will be used to instantiate UI delegates. |
| logger | The logger instance that will be used for all messaging from the instantiated UIDelegate instances. |
- Returns
- A default-configured UI delegate.
- Exceptions
-
All identifiers known to the factory.
- Note
- This may result in a significant amount of work being performed by the supplied UI delegate interface factory.
- See also
- UIDelegate::identifier
Construct an instance of this class.
- Parameters
-
| hostInterface | The host's implementation of the HostInterface that uniquely identifies the host and provides common hooks for the UI delegate to query asset-related properties from the host. |
| uiDelegateImplementationFactory | The factory that will be used to instantiate UI delegates. See, for example, PythonPluginSystemUIDelegateImplementationFactory. |
| logger | The logger instance that will be used for all messaging from the factory and instantiated UIDelegate instances. |
| const Str kDefaultUIDelegateConfigEnvVarName |
|
static |
The documentation for this class was generated from the following file:
- /src/src/openassetio-ui/include/openassetio/ui/hostApi/UIDelegateFactory.hpp