|
mc_rtc
2.14.0
|
Wrapper around lt_dlhandle. More...
#include <mc_rtc/loader.h>
Public Member Functions | |
| LTDLHandle (const std::string &class_name, const std::string &path, const std::string &rpath, bool verbose) | |
| ~LTDLHandle () | |
| LTDLHandle (const LTDLHandle &)=delete | |
| LTDLHandle & | operator= (const LTDLHandle &)=delete |
| template<typename SymT > | |
| SymT | get_symbol (const std::string &name) |
| bool | valid () const |
| const std::vector< std::string > & | classes () const |
| const std::string & | path () const |
| std::string | dir () const |
Wrapper around lt_dlhandle.
On creation it will load the library to check:
After that the library will be closed and opened when symbols are requested by the user
| mc_rtc::LTDLHandle::LTDLHandle | ( | const std::string & | class_name, |
| const std::string & | path, | ||
| const std::string & | rpath, | ||
| bool | verbose | ||
| ) |
Create the handle wrapper
| 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 |
| mc_rtc::LTDLHandle::~LTDLHandle | ( | ) |
|
delete |
|
inline |
Returns a list of available classes provided by this library
| std::string mc_rtc::LTDLHandle::dir | ( | ) | const |
Access the library folder location
| SymT mc_rtc::LTDLHandle::get_symbol | ( | const std::string & | name | ) |
Get a symbol, returns nullptr if the symbol is not found
| name | Name of the symbol to get |
|
delete |
|
inline |
Access the path to the library
|
inline |
True if the library is valid