Inviwo
0.9.10.1
Inviwo documentation
|
Loader for dll/so/dylib. Get functions from loaded library using findSymbol(...). More...
#include <sharedlibrary.h>
Public Member Functions | |
SharedLibrary (const std::string &filePath) | |
SharedLibrary (const SharedLibrary &rhs)=delete | |
SharedLibrary & | operator= (const SharedLibrary &that)=delete |
SharedLibrary (SharedLibrary &&rhs) | |
SharedLibrary & | operator= (SharedLibrary &&that) |
std::string | getFilePath () |
void * | findSymbol (const std::string &name) |
Get function address from library. More... | |
template<typename T > | |
T | findSymbolTyped (const std::string &name) |
Get typed function address from library. More... | |
void | release () |
Static Public Member Functions | |
static std::set< std::string > | libraryFileExtensions () |
Loader for dll/so/dylib. Get functions from loaded library using findSymbol(...).
Loads specified dll/so/dylib on construction and unloads it on destruction. Throws an inviwo::Exception if library failed to load.
void * inviwo::SharedLibrary::findSymbol | ( | const std::string & | name | ) |
Get function address from library.
Example usage:
name | Function name |
T inviwo::SharedLibrary::findSymbolTyped | ( | const std::string & | name | ) |
Get typed function address from library.
Example usage:
name | Function name |
void inviwo::SharedLibrary::release | ( | ) |
Reset the handle and effectively leak the lib. Needed for some dll that crashes on exit otherwise