![]() |
Inviwo 0.9.12-pre
Inviwo documentation
|
Loader for dll/so/dylib. Get functions from loaded library using findSymbol(...). More...
#include <inviwo/core/util/sharedlibrary.h>
Public Member Functions | |
| void * | findSymbol (const std::string &name) |
| Get function address from library. | |
| template<typename T> | |
| T | findSymbolTyped (const std::string &name) |
| Get typed function address from library. | |
| const std::filesystem::path & | getFilePath () |
| SharedLibrary & | operator= (const SharedLibrary &that)=delete |
| SharedLibrary & | operator= (SharedLibrary &&that) noexcept |
| void | release () |
| SharedLibrary (const SharedLibrary &rhs)=delete | |
| SharedLibrary (const std::filesystem::path &filePath) | |
| SharedLibrary (SharedLibrary &&rhs) noexcept | |
Static Public Member Functions | |
| static std::set< std::filesystem::path > | 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