Module class.
More...
#include <module.h>
|
static std::string | module_libpath (std::string module_name) |
| Get the path to the dynamic library. e.g., "mylib" -> "symlink-public/lib/libshiokaze_mylib.dylib". More...
|
|
static module * | alloc_module (configuration &config, std::string arg_name, std::string default_module_name, std::string description) |
| Automatically reads the parameter "arg_name" to fetch the name for the library, and allocate the library. More...
|
|
static module * | alloc_module (std::string path) |
| Reads the dynamic library of a class module, allocate, and return the pointer to it. More...
|
|
static unsigned | close_all_handles () |
| Close all the handles that are still unloaded. More...
|
|
template<class T > |
static std::unique_ptr< T > | unique_alloc_module (configuration &config, std::string arg_name, std::string default_module_name, std::string description) |
| Allocate the module and cast to the a specified class T. More...
|
|
static unsigned | count_open_modules () |
| Count all the open modules. More...
|
|
◆ alloc_module() [1/2]
static module* module::alloc_module |
( |
configuration & |
config, |
|
|
std::string |
arg_name, |
|
|
std::string |
default_module_name, |
|
|
std::string |
description |
|
) |
| |
|
static |
Automatically reads the parameter "arg_name" to fetch the name for the library, and allocate the library.
- Parameters
-
[in] | config | Configutation setting. |
[in] | arg_name | Argument corresponding argument key for the library. |
[in] | default_module_name | Default module name in the case that module associated with arg_name key is not found. |
| [om] | description Description of parameter arg_name. |
- Returns
- Pointer to the loaded dynamic library.
◆ alloc_module() [2/2]
static module* module::alloc_module |
( |
std::string |
path | ) |
|
|
static |
Reads the dynamic library of a class module, allocate, and return the pointer to it.
- Parameters
-
[in] | path | Path to the dynamic library |
- Returns
- Pointer to the loaded dynamic library.
◆ close_all_handles()
static unsigned module::close_all_handles |
( |
| ) |
|
|
static |
Close all the handles that are still unloaded.
- Returns
- Number of closed handles by this call.
◆ count_open_modules()
static unsigned module::count_open_modules |
( |
| ) |
|
|
static |
Count all the open modules.
- Returns
- Number of load modules.
◆ get_module_name()
virtual std::string module::get_module_name |
( |
| ) |
const |
|
inlinevirtual |
Get the module name.
- Returns
- module name
◆ module_libpath()
static std::string module::module_libpath |
( |
std::string |
module_name | ) |
|
|
static |
Get the path to the dynamic library. e.g., "mylib" -> "symlink-public/lib/libshiokaze_mylib.dylib".
- Parameters
-
[in] | module_name | Name of module. |
◆ unique_alloc_module()
template<class T >
static std::unique_ptr<T> module::unique_alloc_module |
( |
configuration & |
config, |
|
|
std::string |
arg_name, |
|
|
std::string |
default_module_name, |
|
|
std::string |
description |
|
) |
| |
|
inlinestatic |
Allocate the module and cast to the a specified class T.
- Parameters
-
[in] | config | Configutation setting. |
[in] | arg_name | Argument corresponding argument key for the library. |
[in] | default_module_name | Default module name in the case that module associated with arg_name key is not found. |
| [om] | description Description of parameter arg_name. |
- Returns
- Pointer to the loaded dynamic library.
The documentation for this class was generated from the following file: