|
Air-Trap 1.0.0
A multiplayer R-Type clone game engine built with C++23 and ECS architecture
|
Provides platform-specific implementations for dynamic library operations. More...
#include <LibraryBackend.hpp>
Static Public Member Functions | |
| static auto | open (std::string_view path) -> std::expected< void *, rtp::Error > |
| Open a dynamic library from the given path. | |
| static auto | close (void *handle) noexcept -> std::expected< void, rtp::Error > |
| Close the dynamic library handle. | |
| static auto | getSymbol (void *handle, std::string_view name) -> std::expected< void *, rtp::Error > |
| Get a symbol from the dynamic library. | |
Provides platform-specific implementations for dynamic library operations.
This class encapsulates all platform-dependent code for loading, unloading, and querying symbols from dynamic libraries. It abstracts away the differences between Unix (dlopen) and Windows (LoadLibrary) APIs.
Definition at line 63 of file LibraryBackend.hpp.
|
staticnoexcept |
Close the dynamic library handle.
| handle | The handle to close. |
Definition at line 69 of file LibraryBackend_Unix.cpp.
References rtp::Error::failure(), and rtp::LibraryLoadFailed.
Referenced by rtp::sys::DynamicLibrary::~DynamicLibrary(), and rtp::sys::DynamicLibrary::operator=().
|
static |
Get a symbol from the dynamic library.
| handle | The dynamic library handle. |
| name | The name of the symbol to get. |
Definition at line 84 of file LibraryBackend_Unix.cpp.
References rtp::Error::failure(), RTP_ASSERT, and rtp::SymbolNotFound.
Referenced by rtp::sys::DynamicLibrary::getSymbolAddress().
|
static |
Open a dynamic library from the given path.
| path | The path to the dynamic library. |
Definition at line 53 of file LibraryBackend_Unix.cpp.
References rtp::Error::failure(), and rtp::LibraryLoadFailed.
Referenced by rtp::sys::LibraryManager::getOrLoadInternal(), and rtp::sys::LibraryManager::loadStandalone().