OpenAssetIO
An abstract API for generalising interactions between a host application and an asset management system
|
Classes | |
class | CppPluginSystem |
Generic plugin system for C++ plugins. More... | |
class | CppPluginSystemManagerImplementationFactory |
A factory to manage CppPluginSystemManagerPlugin derived plugins. More... | |
class | CppPluginSystemManagerPlugin |
Base class to be subclassed by plugins binding a host to an Asset Management System. More... | |
class | CppPluginSystemPlugin |
The base class that defines a plugin of the C++ plugin system. More... | |
class | HybridPluginSystemManagerImplementationFactory |
The hybrid plugin system composes one or more child plugin systems, and abstracts away routing API calls based on priority and capability. More... | |
typedef std::shared_ptr< const CppPluginSystem > CppPluginSystemConstPtr |
using CppPluginSystemManagerImplementationFactoryConstPtr = std::shared_ptr<const CppPluginSystemManagerImplementationFactory > |
using CppPluginSystemManagerImplementationFactoryPtr = std::shared_ptr< CppPluginSystemManagerImplementationFactory > |
typedef std::shared_ptr< const CppPluginSystemManagerPlugin > CppPluginSystemManagerPluginConstPtr |
typedef std::shared_ptr< CppPluginSystemManagerPlugin > CppPluginSystemManagerPluginPtr |
typedef std::shared_ptr< const CppPluginSystemPlugin > CppPluginSystemPluginConstPtr |
typedef std::shared_ptr< CppPluginSystemPlugin > CppPluginSystemPluginPtr |
typedef std::shared_ptr< CppPluginSystem > CppPluginSystemPtr |
using HybridPluginSystemManagerImplementationFactoryConstPtr = std::shared_ptr<const HybridPluginSystemManagerImplementationFactory > |
using HybridPluginSystemManagerImplementationFactoryPtr = std::shared_ptr< HybridPluginSystemManagerImplementationFactory > |
using PluginFactory = openassetio::pluginSystem::CppPluginSystemPluginPtr (*)() noexcept |
Function pointer to a factory that produces instances of CppPluginSystemPlugin wrapped in a shared_ptr.
A pointer to such a function must be returned from an exposed openassetioPlugin
entry point function (with C linkage) from a plugin shared library binary. This function pointer is then called to get the CppPluginSystemPlugin instance.
This two-step process is required to work around Windows disallowing C linkage functions from returning C++ types. That is, the openassetioPlugin
entry point with C linkage returns a raw pointer (to a function). The returned PluginFactory function pointer can then point to a C++ linkage function, which is allowed to return a CppPluginSystemPluginPtr on Windows.
Exception behaviour varies by platform for functions called via pointers retrieved in this way. In particular, the process is terminated with an "access violation" error on Windows. So for cross-platform consistency, the function is marked noexcept
- it is not valid to throw an exception within a PluginFactory.
Copyright 2013-2023 The Foundry Visionmongers Ltd. OpenAssetIO is released under the Apache 2.0 License