68 int load(
const char* library);
75 void unload(
const char* library);
86 T
dlsym(
const char* library,
const char* symbol)
88 const dll_info temp = {std::string(library),
nullptr};
89 auto handle_loc = std::find(
90 this->loaded_plugins.begin(), this->loaded_plugins.end(), temp);
91 if (handle_loc == this->loaded_plugins.end()) {
94 return reinterpret_cast<T
>(
::dlsym(handle_loc->handle, symbol));
106 std::vector<dll_info> loaded_plugins;
107 std::mutex m_dll_mutex;
Loader & operator=(const Loader &)=delete
Loader & operator=(Loader &&)=delete
T dlsym(const char *library, const char *symbol)
void unload(const char *library)
int load(const char *library)
Loader(const Loader &)=delete
Classes associated with the loading/unloading of binaries at run-time.
struct DLL::dll_info dll_info
bool operator!=(const dll_info &rhs) const
bool operator==(const dll_info &rhs) const