33#ifndef DART_COMMON_SHAREDLIBRARY_HPP_
34#define DART_COMMON_SHAREDLIBRARY_HPP_
39#include <boost/filesystem.hpp>
46 #define DYNLIB_HANDLE void*
50 #define DYNLIB_HANDLE void*
55using hInstance = HINSTANCE__*;
56 #define DYNLIB_HANDLE hInstance
61static constexpr const char* DART_SHARED_LIB_EXTENSION =
"so";
63static constexpr const char* DART_SHARED_LIB_EXTENSION =
"dylib";
65static constexpr const char* DART_SHARED_LIB_EXTENSION =
"dll";
67 #error Unhandled platform
71static constexpr const char* DART_SHARED_LIB_PREFIX =
"lib";
73static constexpr const char* DART_SHARED_LIB_PREFIX =
"lib";
75static constexpr const char* DART_SHARED_LIB_PREFIX =
"";
77 #error Unhandled platform
84class SharedLibraryManager;
112 const boost::filesystem::
path&
path);
164 const
std::
string&
path() const;
#define DART_DEPRECATED(version)
Definition Deprecated.hpp:51
SharedLibrary is a RAII object wrapping a shared library.
Definition SharedLibrary.hpp:89
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:182
ProtectedConstructionTag
Definition SharedLibrary.hpp:92
@ ProtectedConstruction
Definition SharedLibrary.hpp:93
bool isValid() const
Returns true if the shared library loading was successful.
Definition SharedLibrary.cpp:119
const boost::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 boost::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:177
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
Definition SharedLibraryManager.hpp:46