|
| DynamicLoader (const std::string &path) |
|
void * | open (const std::string &lib_path) |
|
void * | load (const std::string &func_name) |
|
void | close () |
|
Definition at line 19 of file DynamicLoader.h.
◆ DynamicLoader() [1/2]
◆ DynamicLoader() [2/2]
◆ ~DynamicLoader()
◆ close()
Definition at line 19 of file DynamicLoader.cc.
20{
21 if (m_handle != NULL) {
22 dlclose(m_handle);
23 m_handle = NULL;
24 }
25}
◆ load()
void * load |
( |
const std::string & |
func_name | ) |
|
Definition at line 37 of file DynamicLoader.cc.
38{
39 char* error = NULL;
40 void* func = dlsym(m_handle, funcname.c_str());
41 if ((error = dlerror()) != NULL) {
43 }
44 return func;
45}
◆ open()
void * open |
( |
const std::string & |
lib_path | ) |
|
Definition at line 27 of file DynamicLoader.cc.
28{
29 void* handle = dlopen(lib_path.c_str(), RTLD_LAZY);
30 if (!handle) {
32 }
33 m_handle = handle;
34 return handle;
35}
◆ m_handle
The documentation for this class was generated from the following files: