10#include <experimental/filesystem>
23 explicit Library ( std::string path ) : m_path ( std::move ( path ) ), m_handle (
nullptr ) {
27 Library (
const Library & ) =
delete;
29 Library ( Library && other ) noexcept : m_path ( std::move ( other.m_path ) ), m_handle ( other.m_handle ) {
30 other.m_handle =
nullptr;
33 Library & operator = (
const Library & ) =
delete;
34 Library & operator = ( Library && other ) =
delete;
42 m_handle = dlopen ( m_path.c_str ( ), RTLD_NOW );
54 const std::string & path ( )
const {
58 bool loaded ( )
const {
59 return m_handle !=
nullptr;
64 static std::list < Library >::iterator find (
const std::string & name );
66 static std::list < Library > libraries;
69 static void load ( std::string name );
70 static void unload (
const std::string & name );
Definition: LibraryLoader.h:17
static void load(std::string name)
Definition: LibraryLoader.cpp:21
static void unload(const std::string &name)
Definition: LibraryLoader.cpp:27
Basic exception from which all other exceptions are derived.
Definition: CommonException.h:21