Low-level wrapper for loading shared libraries (DLLs) and accessing symbols within it. More...
#include <yarp/os/SharedLibrary.h>
Public Member Functions | |
SharedLibrary () | |
Initialize, without opening a shared library yet. | |
SharedLibrary (const char *filename) | |
Load the named shared library / DLL. | |
SharedLibrary (const SharedLibrary &)=delete | |
SharedLibrary & | operator= (const SharedLibrary &)=delete |
virtual | ~SharedLibrary () |
Destructor. | |
bool | open (const char *filename) |
Load the named shared library / DLL. | |
bool | close () |
Shared library no longer needed, unload if not in use elsewhere. | |
std::string | error () |
Returns a human-readable string describing the most recent error that occurred from a call to one of its functions. | |
void * | getSymbol (const char *symbolName) |
Look up a symbol in the shared library. | |
bool | isValid () const |
Check if the shared library is valid. | |
Low-level wrapper for loading shared libraries (DLLs) and accessing symbols within it.
Definition at line 25 of file SharedLibrary.h.
SharedLibrary::SharedLibrary | ( | ) |
Initialize, without opening a shared library yet.
Definition at line 56 of file SharedLibrary.cpp.
Load the named shared library / DLL.
filename | name of file (see open method) |
Definition at line 62 of file SharedLibrary.cpp.
|
delete |
|
virtual |
bool SharedLibrary::close | ( | ) |
Shared library no longer needed, unload if not in use elsewhere.
Definition at line 101 of file SharedLibrary.cpp.
std::string SharedLibrary::error | ( | ) |
Returns a human-readable string describing the most recent error that occurred from a call to one of its functions.
Definition at line 121 of file SharedLibrary.cpp.
Look up a symbol in the shared library.
Definition at line 126 of file SharedLibrary.cpp.
bool SharedLibrary::isValid | ( | ) | const |
Check if the shared library is valid.
Definition at line 145 of file SharedLibrary.cpp.
Load the named shared library / DLL.
The library is found using the algoithm of ACE::ldfind. Operating-system-specific extensions will be tried, and the relevant path for shared libraries.
filename | name of file. |
Definition at line 76 of file SharedLibrary.cpp.
|
delete |