#include <interop/dl/include/alpaqa/dl/dl-problem.hpp>
Definition at line 16 of file dl-problem.hpp.
|
| DLLoader (std::string so_filename, std::string symbol_prefix) |
| Load a shared library.
|
|
std::shared_ptr< void > | load_lib () const |
| Open the shared library using dlopen
|
|
template<class F > |
F * | load_func (std::string_view name) const |
| Load a function with signature F from the library using dlsym .
|
|
template<class Signature >
requires std::is_function_v<Signature> |
const std::function< Signature > & | extra_func (const std::string &name) const |
|
template<class Ret , class... FArgs, class... Args> |
decltype(auto) | call_extra_func_helper (const void *instance, FuncTag< Ret(const instance_t *, FArgs...)>, const std::string &name, Args &&...args) const |
|
template<class Ret , class... FArgs, class... Args> |
decltype(auto) | call_extra_func_helper (void *instance, FuncTag< Ret(instance_t *, FArgs...)>, const std::string &name, Args &&...args) |
|
template<class Ret , class... FArgs, class... Args> |
decltype(auto) | call_extra_func_helper (const void *, FuncTag< Ret(FArgs...)>, const std::string &name, Args &&...args) const |
|
◆ alpaqa::dl::DLLoader::FuncTag
struct alpaqa::dl::DLLoader::FuncTag |
◆ dl_handle_t
◆ DLLoader()
DLLoader |
( |
std::string |
so_filename, |
|
|
std::string |
symbol_prefix |
|
) |
| |
|
protected |
Load a shared library.
- Parameters
-
so_filename | Filename of the shared library to load. |
symbol_prefix | Prefix of the symbols in the library. |
Definition at line 31 of file dl-problem.cpp.
◆ load_lib()
std::shared_ptr< void > load_lib |
( |
| ) |
const |
|
protected |
Open the shared library using dlopen
Definition at line 10 of file dl-problem.cpp.
◆ load_func()
F * load_func |
( |
std::string_view |
name | ) |
const |
|
protected |
Load a function with signature F
from the library using dlsym
.
Definition at line 20 of file dl-problem.cpp.
◆ extra_func()
const std::function< Signature > & extra_func |
( |
const std::string & |
name | ) |
const |
|
inlineprotected |
◆ call_extra_func_helper() [1/3]
decltype(auto) call_extra_func_helper |
( |
const void * |
instance, |
|
|
FuncTag< Ret(const instance_t *, FArgs...)> |
, |
|
|
const std::string & |
name, |
|
|
Args &&... |
args |
|
) |
| const |
|
inlineprotected |
◆ call_extra_func_helper() [2/3]
decltype(auto) call_extra_func_helper |
( |
void * |
instance, |
|
|
FuncTag< Ret(instance_t *, FArgs...)> |
, |
|
|
const std::string & |
name, |
|
|
Args &&... |
args |
|
) |
| |
|
inlineprotected |
◆ call_extra_func_helper() [3/3]
decltype(auto) call_extra_func_helper |
( |
const void * |
, |
|
|
FuncTag< Ret(FArgs...)> |
, |
|
|
const std::string & |
name, |
|
|
Args &&... |
args |
|
) |
| const |
|
inlineprotected |
◆ so_filename
◆ symbol_prefix
std::string symbol_prefix |
|
protected |
◆ handle
Handle to the shared library (returned by dlopen
).
Definition at line 31 of file dl-problem.hpp.
◆ extra_functions
An associative array of additional functions exposed by the problem.
Definition at line 34 of file dl-problem.hpp.
The documentation for this class was generated from the following files: