OXY API 1.0
OXY API Library Documentation
Loading...
Searching...
No Matches
oxy::core::plugin::get_library_fn Struct Reference

Function object to retrieve a shared library from a specified folder based on a symbol name. More...

#include <plugin.hpp>

Public Types

using result_t = maybe<std::filesystem::path>

Public Member Functions

auto operator() (std::filesystem::path const &folder, std::string const &symbol_name) const -> result_t

Detailed Description

Function object to retrieve a shared library from a specified folder based on a symbol name.

This functor provides an interface to retrieve a shared library from a specified folder based on a given symbol name. It takes a folder path and a symbol name as input and returns a maybe<fs::path> that contains the path to the shared library if found, or an empty maybe if not found. This allows for efficient retrieval of shared libraries for plugin management and loading in the oxy core library.

Member Function Documentation

◆ operator()()

auto oxy::core::plugin::get_library_fn::operator() ( std::filesystem::path const & folder,
std::string const & symbol_name ) const -> result_t
Parameters
folder- The path of the folder to search for the shared library.
symbol_name- The name of the symbol to search for in the shared library.
Returns
A maybe<fs::path> containing the path to the shared library if found, or an empty maybe if not found.