Manages dynamic libraries, providing loading and caching mechanisms.
More...
#include <LibraryManager.hpp>
Manages dynamic libraries, providing loading and caching mechanisms.
Definition at line 63 of file LibraryManager.hpp.
◆ LibraryManager() [1/3]
| rtp::sys::LibraryManager::LibraryManager |
( |
void |
| ) |
|
|
default |
◆ ~LibraryManager()
| rtp::sys::LibraryManager::~LibraryManager |
( |
| ) |
|
|
defaultnoexcept |
◆ LibraryManager() [2/3]
◆ LibraryManager() [3/3]
◆ getOrLoadInternal()
| auto rtp::sys::LibraryManager::getOrLoadInternal |
( |
std::string_view |
path | ) |
-> std::expected<std::shared_ptr<DynamicLibrary>,
rtp::Error> |
|
private |
◆ load()
Main API.
Load a dynamic library, and return a raw pointer to the instance (Observer).
- Parameters
-
| path | The path to the dynamic library. |
- Returns
- std::expected<const DynamicLibrary *, rtp::Error>
Definition at line 58 of file LibraryManager.cpp.
References rtp::sys::DynamicLibrary::get().
◆ loadShared()
| auto rtp::sys::LibraryManager::loadShared |
( |
std::string_view |
path | ) |
-> std::expected<std::shared_ptr<DynamicLibrary>, rtp::Error> |
Shared API.
Load a dynamic library from the given path. If the library is already loaded, return the existing instance.
- Parameters
-
| path | The path to the dynamic library. |
- Returns
- std::expected<std::shared_ptr<DynamicLibrary>, rtp::Error>
Definition at line 69 of file LibraryManager.cpp.
◆ loadStandalone()
| auto rtp::sys::LibraryManager::loadStandalone |
( |
std::string_view |
path | ) |
-> std::expected<std::unique_ptr<DynamicLibrary>, rtp::Error> |
|
static |
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ _libraries
| std::unordered_map<std::string, std::shared_ptr<DynamicLibrary> > rtp::sys::LibraryManager::_libraries |
|
private |
◆ _mutex
| std::shared_mutex rtp::sys::LibraryManager::_mutex |
|
private |
The documentation for this class was generated from the following files: