33 #ifndef DART_COMMON_SHAREDLIBRARY_HPP_ 34 #define DART_COMMON_SHAREDLIBRARY_HPP_ 39 #include <boost/filesystem.hpp> 41 #include "dart/common/Deprecated.hpp" 42 #include "dart/common/Platform.hpp" 46 # define DYNLIB_HANDLE void* 50 # define DYNLIB_HANDLE void* 61 using hInstance = HINSTANCE__*;
62 # define DYNLIB_HANDLE hInstance 67 static constexpr
const char* DART_SHARED_LIB_EXTENSION =
"so";
69 static constexpr
const char* DART_SHARED_LIB_EXTENSION =
"dylib";
71 static constexpr
const char* DART_SHARED_LIB_EXTENSION =
"dll";
73 # error Unhandled platform 77 static constexpr
const char* DART_SHARED_LIB_PREFIX =
"lib";
79 static constexpr
const char* DART_SHARED_LIB_PREFIX =
"lib";
81 static constexpr
const char* DART_SHARED_LIB_PREFIX =
"";
83 # error Unhandled platform 90 class SharedLibraryManager;
97 enum ProtectedConstructionTag
116 DART_DEPRECATED(6.10)
117 static std::shared_ptr<SharedLibrary> create(
118 const boost::filesystem::path& path);
131 static std::shared_ptr<SharedLibrary> create(
const std::string& path);
146 DART_DEPRECATED(6.10)
148 ProtectedConstructionTag,
const boost::filesystem::path& path);
161 explicit SharedLibrary(ProtectedConstructionTag,
const std::string& path);
167 const boost::filesystem::path& getCanonicalPath()
const;
170 const std::string& path()
const;
173 bool isValid()
const;
180 void* getSymbol(
const std::string& symbolName)
const;
201 std::string getLastError()
const;
207 #endif // DART_COMMON_SHAREDLIBRARY_HPP_ DYNLIB_HANDLE mInstance
Handle to the loaded library.
Definition: SharedLibrary.hpp:197
std::string mPath
Canonical path to the shared library where a canonical path is an absolute path that has no elements ...
Definition: SharedLibrary.hpp:194
Definition: Aspect.cpp:40
boost::filesystem::path mCanonicalPath
Canonical path to the shared library where a canonical path is an absolute path that has no elements ...
Definition: SharedLibrary.hpp:188
Definition: SharedLibraryManager.hpp:66
SharedLibrary is a RAII object wrapping a shared library.
Definition: SharedLibrary.hpp:94