40#ifndef RTYPE_DYNAMICLIBRARY_HPP_
41 #define RTYPE_DYNAMICLIBRARY_HPP_
47 #include <string_view>
85 auto get(std::string_view name)
const
86 -> std::expected<T, rtp::Error>;
98 -> std::expected<void *, rtp::Error>;
Error handling system with categorized error codes.
Represents a dynamically loaded library.
DynamicLibrary & operator=(const DynamicLibrary &)=delete
DynamicLibrary(const DynamicLibrary &)=delete
void * _handle
The handle to the dynamic library.
auto getSymbolAddress(std::string_view name) const -> std::expected< void *, rtp::Error >
Get the address of a symbol from the dynamic library.
auto get(std::string_view name) const -> std::expected< T, rtp::Error >
Get a symbol from the dynamic library.
DynamicLibrary & operator=(DynamicLibrary &&other) noexcept
~DynamicLibrary() noexcept
Destructor.