Low-level wrapper for loading shared libraries (DLLs) and accessing symbols within it.
More...
#include <robottestingframework/dll/SharedLibrary.h>
|
| | SharedLibrary () |
| | Initialize, without opening a shared library yet. More...
|
| |
| | SharedLibrary (const char *filename) |
| | Load the named shared library / DLL. More...
|
| |
| virtual | ~SharedLibrary () |
| | Destructor. More...
|
| |
| bool | open (const char *filename) |
| | Load the named shared library / DLL. More...
|
| |
| bool | close () |
| | Shared library no longer needed, unload if not in use elsewhere. More...
|
| |
| std::string | error () |
| | Returns a human-readable string describing the most recent error that occurred from a call to one of its functions. More...
|
| |
| void * | getSymbol (const char *symbolName) |
| | Look up a symbol in the shared library. More...
|
| |
| bool | isValid () const |
| | Check if the shared library is valid. More...
|
| |
Low-level wrapper for loading shared libraries (DLLs) and accessing symbols within it.
Definition at line 35 of file SharedLibrary.h.
◆ SharedLibrary() [1/3]
| shlibpp::SharedLibrary::SharedLibrary |
( |
| ) |
|
Initialize, without opening a shared library yet.
◆ SharedLibrary() [2/3]
| shlibpp::SharedLibrary::SharedLibrary |
( |
const char * |
filename | ) |
|
Load the named shared library / DLL.
- Parameters
-
| filename | name of file (see open method) |
◆ ~SharedLibrary()
| virtual shlibpp::SharedLibrary::~SharedLibrary |
( |
| ) |
|
|
virtual |
Destructor.
Will close() if needed.
◆ SharedLibrary() [3/3]
◆ close()
| bool shlibpp::SharedLibrary::close |
( |
| ) |
|
Shared library no longer needed, unload if not in use elsewhere.
- Returns
- true on success
◆ error()
| std::string shlibpp::SharedLibrary::error |
( |
| ) |
|
Returns a human-readable string describing the most recent error that occurred from a call to one of its functions.
- Returns
- the most recent error
◆ getSymbol()
| void* shlibpp::SharedLibrary::getSymbol |
( |
const char * |
symbolName | ) |
|
Look up a symbol in the shared library.
◆ isValid()
| bool shlibpp::SharedLibrary::isValid |
( |
| ) |
const |
Check if the shared library is valid.
- Returns
- true iff a valid library has been loaded.
◆ open()
| bool shlibpp::SharedLibrary::open |
( |
const char * |
filename | ) |
|
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.
- Parameters
-
- Returns
- true on success
◆ operator=()
◆ err_message
| std::string shlibpp::SharedLibrary::err_message |
|
private |
◆ implementation
| void* shlibpp::SharedLibrary::implementation |
|
private |
The documentation for this class was generated from the following file: