Wrapper around lt_dlhandle.
More...
#include <mc_rtc/loader.h>
Wrapper around lt_dlhandle.
On creation it will load the library to check:
- if a provided symbol is defined in the library
- if it should be loaded globally
After that the library will be closed and opened when symbols are requested by the user
◆ LTDLHandle() [1/2]
mc_rtc::LTDLHandle::LTDLHandle |
( |
const std::string & |
class_name, |
|
|
const std::string & |
path, |
|
|
const std::string & |
rpath, |
|
|
bool |
verbose |
|
) |
| |
Create the handle wrapper
- Parameters
-
class_name | Symbol that should be checked for |
path | Path to the library |
rpath | Path(s) used to search for libraries, this is only used on Windows, on Linux/macOS one is advised to use RPATH capabilties |
verbose | If true, output debug information |
◆ ~LTDLHandle()
mc_rtc::LTDLHandle::~LTDLHandle |
( |
| ) |
|
◆ LTDLHandle() [2/2]
mc_rtc::LTDLHandle::LTDLHandle |
( |
const LTDLHandle & |
| ) |
|
|
delete |
◆ classes()
const std::vector<std::string>& mc_rtc::LTDLHandle::classes |
( |
| ) |
const |
|
inline |
Returns a list of available classes provided by this library
◆ dir()
std::string mc_rtc::LTDLHandle::dir |
( |
| ) |
const |
Access the library folder location
◆ get_symbol()
template<typename SymT >
SymT mc_rtc::LTDLHandle::get_symbol |
( |
const std::string & |
name | ) |
|
Get a symbol, returns nullptr if the symbol is not found
- Parameters
-
name | Name of the symbol to get |
◆ operator=()
◆ path()
const std::string& mc_rtc::LTDLHandle::path |
( |
| ) |
const |
|
inline |
Access the path to the library
◆ valid()
bool mc_rtc::LTDLHandle::valid |
( |
| ) |
const |
|
inline |
True if the library is valid
The documentation for this class was generated from the following file: