The SharedLibrary class dynamically loads shared libraries at run-time.
More...
|
typedef std::mutex | MutexRW |
|
typedef std::unique_lock< std::mutex > | WriteMutex |
|
|
| SharedLibrary (const std::string &path) |
| Creates a SharedLibrary object.
|
|
virtual | ~SharedLibrary () |
| Creates a SharedLibrary object and loads a library from the given path.
|
|
bool | load (const std::string &path, int flags=0) |
| Destroys the SharedLibrary. The actual library remains loaded.
|
|
void | unload () |
| Loads a shared library from the given path. Throws a LibraryAlreadyLoadedException if a library has already been loaded. Throws a LibraryLoadException if the library cannot be loaded.
|
|
bool | isLoaded () const |
| Unloads a shared library.
|
|
bool | hasSymbol (const std::string &name) |
| Returns true iff a library has been loaded.
|
|
void * | getSymbol (const std::string &name) |
| Returns true iff the loaded library contains a symbol with the given name.
|
|
const std::string & | getPath () const |
| Returns the address of the symbol with the given name. For functions, this is the entry point of the function. Throws a NotFoundException if the symbol does not exist.
|
|
|
static std::string | suffix () |
| Returns the path of the library, as specified in a call to load() or the constructor.
|
|
The SharedLibrary class dynamically loads shared libraries at run-time.