Wraps a dynamic library handler and provide methods to interact with it.
More...
#include <dynamiclibrary.hpp>
Wraps a dynamic library handler and provide methods to interact with it.
Definition at line 38 of file dynamiclibrary.hpp.
◆ RelocationMode
◆ DynamicLibrary() [1/2]
DynamicLibrary::DynamicLibrary |
( |
const std::string & |
file | ) |
|
|
explicit |
Construct a dynamic library wrapper for the shared object referenced by name.
- Parameters
-
file | is the path to the dynamic library file. |
Definition at line 29 of file dynamiclibrary.cpp.
◆ ~DynamicLibrary()
DynamicLibrary::~DynamicLibrary |
( |
| ) |
|
|
default |
◆ DynamicLibrary() [2/2]
◆ close()
void DynamicLibrary::close |
( |
| ) |
|
Close the already opened library handler.
- Exceptions
-
Definition at line 48 of file dynamiclibrary.cpp.
◆ getFilePath()
const std::string & DynamicLibrary::getFilePath |
( |
| ) |
const |
Returns the full path from which the library was loaded.
Definition at line 65 of file dynamiclibrary.cpp.
◆ getSymbol()
void * DynamicLibrary::getSymbol |
( |
const std::string & |
symbol | ) |
|
Lookup a symbol by name and return a pointer to it.
You need to open() the library first.
- Exceptions
-
Definition at line 54 of file dynamiclibrary.cpp.
◆ open()
Attempts to open the shared library file so that we can access its symbols.
You must call open() before calling getSymbol().
- Exceptions
-
Definition at line 35 of file dynamiclibrary.cpp.
◆ operator=()
◆ _file
std::string DynamicLibrary::_file |
|
private |
◆ _handle
void* DynamicLibrary::_handle |
|
private |
The documentation for this class was generated from the following files: