33#ifndef DART_COMMON_SHAREDLIBRARY_HPP_
34#define DART_COMMON_SHAREDLIBRARY_HPP_
45 #define DYNLIB_HANDLE void*
49 #define DYNLIB_HANDLE void*
54using hInstance = HINSTANCE__*;
55 #define DYNLIB_HANDLE hInstance
60static constexpr const char* DART_SHARED_LIB_EXTENSION =
"so";
62static constexpr const char* DART_SHARED_LIB_EXTENSION =
"dylib";
64static constexpr const char* DART_SHARED_LIB_EXTENSION =
"dll";
66 #error Unhandled platform
70static constexpr const char* DART_SHARED_LIB_PREFIX =
"lib";
72static constexpr const char* DART_SHARED_LIB_PREFIX =
"lib";
74static constexpr const char* DART_SHARED_LIB_PREFIX =
"";
76 #error Unhandled platform
83class SharedLibraryManager;
111 const common::filesystem::
path&
path);
163 const std::
string&
path() const;
173 void*
getSymbol(const std::
string& symbolName) const;
#define DART_DEPRECATED(version)
Definition Deprecated.hpp:51
SharedLibrary is a RAII object wrapping a shared library.
Definition SharedLibrary.hpp:88
ProtectedConstructionTag
Definition SharedLibrary.hpp:91
@ ProtectedConstruction
Definition SharedLibrary.hpp:92
bool isValid() const
Returns true if the shared library loading was successful.
Definition SharedLibrary.cpp:119
common::filesystem::path mCanonicalPath
Canonical path to the shared library where a canonical path is an absolute path that has no elements ...
Definition SharedLibrary.hpp:182
const common::filesystem::path & getCanonicalPath() const
Returns the path to the shared library file.
Definition SharedLibrary.cpp:107
const std::string & path() const
Returns the path to the shared library file.
Definition SharedLibrary.cpp:113
std::string mPath
Canonical path to the shared library where a canonical path is an absolute path that has no elements ...
Definition SharedLibrary.hpp:188
static std::shared_ptr< SharedLibrary > create(const common::filesystem::path &path)
Creates a SharedLibrary from a path to the shared library.
Definition SharedLibrary.cpp:59
void * getSymbol(const std::string &symbolName) const
Returns a symbol from the shared library if it exists.
Definition SharedLibrary.cpp:125
friend class detail::SharedLibraryManager
Definition SharedLibrary.hpp:176
std::string getLastError() const
Returns the last loading error.
Definition SharedLibrary.cpp:143
DYNLIB_HANDLE mInstance
Handle to the loaded library.
Definition SharedLibrary.hpp:191
Definition BulletCollisionDetector.cpp:60