rexlib 0.1.0
Device-agnostic array computing library for CryoEM and CryoET image processing, with a pluggable backend architecture
Loading...
Searching...
No Matches
Public Member Functions | List of all members
rexlib::plugin_manager Class Reference

Class managing a set of plugins. More...

#include <rexlib/core/plugin_manager.hpp>

Public Member Functions

 plugin_manager (const plugin_manager &other)=delete
 
 plugin_manager (plugin_manager &&other) noexcept
 
plugin_manager & operator= (const plugin_manager &other)=delete
 
plugin_manager & operator= (plugin_manager &&other) noexcept
 
void add_plugin (const plugin &plugin)
 Add a already loaded plugin.
 
const plugin * load_plugin (const std::string &path)
 Load a plugin from a Shared Object and add it.
 
std::size_t get_plugin_count () const noexcept
 Get the number of plugins known by this manager.
 
const plugin & get_plugin (std::size_t index) const
 Get the i-th plugin.
 

Detailed Description

Class managing a set of plugins.

Member Function Documentation

◆ add_plugin()

void rexlib::plugin_manager::add_plugin ( const plugin &  plugin)

Add a already loaded plugin.

Parameters
pluginThe plugin to be added.

◆ get_plugin()

const plugin & rexlib::plugin_manager::get_plugin ( std::size_t  index) const

Get the i-th plugin.

Parameters
indexThe index of the requested plugin. Must be less than the plugin count.
Returns
const plugin& The requested plugin.

◆ get_plugin_count()

std::size_t rexlib::plugin_manager::get_plugin_count ( ) const
noexcept

Get the number of plugins known by this manager.

Returns
std::size_t The number of plugins.

◆ load_plugin()

const plugin * rexlib::plugin_manager::load_plugin ( const std::string &  path)

Load a plugin from a Shared Object and add it.

The path to the shared object can be provided without a extension, in which case it will be inferred from the platform. Relative paths will be searched in LD_LIBRARY_PATH.

Parameters
pathPath to the plugin.
Returns
const plugin* The loaded plugin. nullptr if it could not be loaded.

The documentation for this class was generated from the following file: