Class that takes in charge of loading dynamic libraries. More...
#include <dylibloader.h>
Public Member Functions | |
dylibloader () | |
Default constructor for dylibloader. | |
virtual | ~dylibloader () |
Default destructor for dylibloader. close_library() will be also called if necessary. | |
bool | open_library (std::string path) |
Load dynamic libraries. More... | |
void | close_library () |
Unload dynamic library. | |
const void * | get_handle () const |
Get the native pointer to the loaded dynamic library. More... | |
void * | load_symbol (std::string name) const |
Load function of global variable. More... | |
void | load (configuration &config) override |
Call the function symbol "load". More... | |
void | configure (configuration &config) override |
Call the function symbol "configure". More... | |
void | overwrite (configuration &config) const |
Call the function symbol "overwrite", expecting that some configuration will be overwritten. More... | |
![]() | |
virtual void | initialize (const environment_map &environment) |
Initialize the program. Used to get things ready for actual use. More... | |
virtual void | setup_now (configuration &config=get_global_configuration()) |
Run load - configure - initialize processes. | |
virtual bool | not_recursive () |
Check if this instance is not derived from recursive_configurable. More... | |
Additional Inherited Members | |
![]() | |
using | environment_map = std::map< std::string, const void * > |
Type for environment_map. | |
![]() | |
static configuration & | set_global_configuration (const configuration &config) |
Assign the global settings of the program. More... | |
static configuration & | get_global_configuration () |
Get the global settings of the program. More... | |
template<class T > | |
static const T & | get_env (const environment_map &environment, std::string key) |
Extract an specified type of pointer from the input environment. More... | |
![]() | |
bool | check_set (const environment_map &environment, std::vector< std::string > names) |
Check if the values for a variable keys exist. More... | |
Class that takes in charge of loading dynamic libraries.
|
overridevirtual |
Call the function symbol "configure".
[in] | config | Configuration setting. |
Reimplemented from configurable.
|
inline |
Get the native pointer to the loaded dynamic library.
|
overridevirtual |
Call the function symbol "load".
[in] | config | Configuration setting. |
Reimplemented from configurable.
void* dylibloader::load_symbol | ( | std::string | name | ) | const |
Load function of global variable.
bool dylibloader::open_library | ( | std::string | path | ) |
Load dynamic libraries.
[in] | path | Path to the dynamic library. |
void dylibloader::overwrite | ( | configuration & | config | ) | const |
Call the function symbol "overwrite", expecting that some configuration will be overwritten.
[in] | config | Configuration setting. |