33#ifndef DART_COMMON_SHAREDLIBRARY_HPP_
34#define DART_COMMON_SHAREDLIBRARY_HPP_
38#include <boost/filesystem.hpp>
43#define DYNLIB_HANDLE void*
47#define DYNLIB_HANDLE void*
58using hInstance = HINSTANCE__*;
59#define DYNLIB_HANDLE hInstance
67class SharedLibraryManager;
91 static std::shared_ptr<SharedLibrary>
create(
92 const boost::filesystem::path& path);
122 void*
getSymbol(
const std::string& symbolName)
const;
SharedLibrary is a RAII object wrapping a shared library.
Definition SharedLibrary.hpp:72
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:130
ProtectedConstructionTag
Definition SharedLibrary.hpp:75
@ ProtectedConstruction
Definition SharedLibrary.hpp:76
bool isValid() const
Returns true if the shared library loading was successful.
Definition SharedLibrary.cpp:100
const boost::filesystem::path & getCanonicalPath() const
Returns the path to the shared library file.
Definition SharedLibrary.cpp:94
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:106
std::string getLastError() const
Returns the last loading error.
Definition SharedLibrary.cpp:124
virtual ~SharedLibrary()
Destructor.
Definition SharedLibrary.cpp:81
DYNLIB_HANDLE mInstance
Handle to the loaded library.
Definition SharedLibrary.hpp:133
Definition SharedLibraryManager.hpp:63
Definition BulletCollisionDetector.cpp:63