rexlib 0.1.0
Device-agnostic array computing library for CryoEM and CryoET image processing, with a pluggable backend architecture
Loading...
Searching...
No Matches
plugin_manager.hpp
1// SPDX-License-Identifier: GPL-3.0-only
2
3#pragma once
4
5#include "platform/dynamic_shared_object.h"
6
7#include <memory>
8#include <string>
9#include <vector>
10
11namespace rexlib
12{
13
14class plugin;
15class service_catalog;
16
22{
23public:
25 plugin_manager(const plugin_manager& other) = delete;
28
29 plugin_manager& operator=(const plugin_manager& other) = delete;
30 REXLIB_API plugin_manager& operator=(plugin_manager&& other) noexcept;
31
38
50 REXLIB_API const plugin* load_plugin(const std::string &path);
51
58
66 REXLIB_API const plugin& get_plugin(std::size_t index) const;
67
70 std::unique_ptr<implementation> m_implementation;
71
72 void create_if_null();
73};
74
75
87
102std::vector<std::string> get_plugin_search_path();
103
113
123
137 );
138
139} // namespace rexlib
Container for multidimensional numeric data.
Definition array.hpp:31
Class managing a set of plugins.
Definition plugin_manager.hpp:22
const plugin * load_plugin(const std::string &path)
Load a plugin from a Shared Object and add it.
const plugin & get_plugin(std::size_t index) const
Get the i-th plugin.
void add_plugin(const plugin &plugin)
Add a already loaded plugin.
std::size_t get_plugin_count() const noexcept
Get the number of plugins known by this manager.
Abstract class representing a plugin interface.
Definition plugin.hpp:23
Stores a single instance of each type service_manager.
Definition service_catalog.hpp:23
Arrays, the operations on them and the devices that run those operations.
Definition cpu_device.hpp:10
std::size_t register_all_plugins_at(const plugin_manager &manager, service_catalog &catalog)
Register all plugins from a plugin manager into an interface catalog.
std::vector< std::string > get_plugin_search_path()
Get the directories where plugins are searched for.
void discover_plugins(const std::string &directory, plugin_manager &manager)
Discover and load all plugins in a directory.
std::string get_default_plugin_directory()
Get the default plugin directory.