A Module implementation for the dl dynamic loader library that comes with glibc, applicable for Linux Systems. More...
#include <utils/system/dynamic_module/module_dl.h>

Public Member Functions | |
| ModuleDL (std::string filename, Module::ModuleFlags flags=Module::MODULE_FLAGS_DEFAULT) | |
| Constructor for ModuleDL. | |
| virtual | ~ModuleDL () |
| Destructor of ModuleDL. | |
| virtual void | open () |
| Open the module. | |
| virtual bool | close () |
| Close the module. | |
| virtual void | ref () |
| Increment the reference count of this module. | |
| virtual void | unref () |
| Decrease the reference count of this module. | |
| virtual bool | notref () |
| Check if there are no reference to this module. | |
| virtual unsigned int | get_ref_count () |
| Get the reference count of this module. | |
| virtual bool | has_symbol (const char *symbol_name) |
| Check if the module has the given symbol. | |
| virtual void * | get_symbol (const char *symbol_name) |
| Get a symbol from the module. | |
| virtual bool | operator== (ModuleDL &cmod) |
| Compare to another ModuleDL instance. | |
| virtual std::string | get_filename () |
| Get the full file name of the module. | |
| virtual std::string | get_base_filename () |
| Get the base file name of the module. | |
Static Public Member Functions | |
| static const char * | get_file_extension () |
| Get file extension for dl modules. | |
A Module implementation for the dl dynamic loader library that comes with glibc, applicable for Linux Systems.
Definition at line 33 of file module_dl.h.
| fawkes::ModuleDL::ModuleDL | ( | std::string | filename, | |
| Module::ModuleFlags | flags = Module::MODULE_FLAGS_DEFAULT | |||
| ) |
Constructor for ModuleDL.
| filename | Full filename of the module | |
| flags | Module flags, |
Definition at line 52 of file module_dl.cpp.
| fawkes::ModuleDL::~ModuleDL | ( | ) | [virtual] |
| bool fawkes::ModuleDL::close | ( | ) | [virtual] |
Close the module.
Implements fawkes::Module.
Definition at line 138 of file module_dl.cpp.
Referenced by ~ModuleDL().
| std::string fawkes::ModuleDL::get_base_filename | ( | ) | [virtual] |
Get the base file name of the module.
Implements fawkes::Module.
Definition at line 274 of file module_dl.cpp.
| const char * fawkes::ModuleDL::get_file_extension | ( | ) | [static] |
Get file extension for dl modules.
Definition at line 253 of file module_dl.cpp.
| std::string fawkes::ModuleDL::get_filename | ( | ) | [virtual] |
Get the full file name of the module.
Implements fawkes::Module.
Definition at line 263 of file module_dl.cpp.
Referenced by operator==().
| unsigned int fawkes::ModuleDL::get_ref_count | ( | ) | [virtual] |
Get the reference count of this module.
Implements fawkes::Module.
Definition at line 189 of file module_dl.cpp.
| void * fawkes::ModuleDL::get_symbol | ( | const char * | symbol_name | ) | [virtual] |
Get a symbol from the module.
| symbol_name | The name of the symbol. NOTE: C++ symbols are mangled with type info and thus are not plainly available as symbol name. Use extern "C" to avoid this. Read http://www.isotton.com/howtos/C++-dlopen-mini-HOWTO/C++-dlopen-mini-HOWTO.html for more information on this topic. |
Implements fawkes::Module.
Definition at line 240 of file module_dl.cpp.
| bool fawkes::ModuleDL::has_symbol | ( | const char * | symbol_name | ) | [virtual] |
Check if the module has the given symbol.
| symbol_name | The name of the symbol. NOTE: C++ symbols are mangled with type info and thus are not plainly available as symbol name. Use extern "C" to avoid this. Read http://www.isotton.com/howtos/C++-dlopen-mini-HOWTO/C++-dlopen-mini-HOWTO.html for more information on this topic. |
Implements fawkes::Module.
Definition at line 217 of file module_dl.cpp.
| bool fawkes::ModuleDL::notref | ( | ) | [virtual] |
Check if there are no reference to this module.
Implements fawkes::Module.
Definition at line 179 of file module_dl.cpp.
| void fawkes::ModuleDL::open | ( | ) | [virtual] |
Open the module.
| ModuleOpenException | Thrown if there was any problem while loading the module |
Implements fawkes::Module.
Definition at line 78 of file module_dl.cpp.
References fawkes::Exception::append(), and fawkes::File::is_regular().
| bool fawkes::ModuleDL::operator== | ( | ModuleDL & | cmod | ) | [virtual] |
Compare to another ModuleDL instance.
| cmod | a reference to the other comparison instance |
Definition at line 201 of file module_dl.cpp.
References get_filename().
| void fawkes::ModuleDL::ref | ( | ) | [virtual] |
Increment the reference count of this module.
Implements fawkes::Module.
Definition at line 158 of file module_dl.cpp.
| void fawkes::ModuleDL::unref | ( | ) | [virtual] |
Decrease the reference count of this module.
Implements fawkes::Module.
Definition at line 166 of file module_dl.cpp.
1.7.1