fawkes::Module Class Reference
Interface representing a dynamically loaded software module. More...
#include <utils/system/dynamic_module/module.h>

Public Types | ||||
| enum | ModuleFlags { MODULE_FLAGS_NONE = 0, MODULE_FLAGS_DEFAULT = 0x000E, MODULE_BIND_LAZY = 0x0001, MODULE_BIND_NOW = 0x0002, MODULE_BIND_LOCAL = 0x0000, MODULE_BIND_GLOBAL = 0x0004, MODULE_BIND_MASK = 0x0003, MODULE_BIND_DEEP = 0x0008 } | |||
| Flags for the loading process. More... | ||||
Public Member Functions | ||||
| virtual | ~Module () | |||
| Virtual empty destructor. | ||||
| virtual void | open ()=0 | |||
Open the module
| ||||
| virtual bool | close ()=0 | |||
| Close the module. | ||||
| virtual void | ref ()=0 | |||
| Increment the reference count of this module. | ||||
| virtual void | unref ()=0 | |||
| Decrease the reference count of this module. | ||||
| virtual bool | notref ()=0 | |||
| Check if there are no reference to this module. | ||||
| virtual unsigned int | get_ref_count ()=0 | |||
| Get the reference count of this module. | ||||
| virtual bool | has_symbol (const char *symbol_name)=0 | |||
| Check if the module has the given symbol. | ||||
| virtual void * | get_symbol (const char *symbol_name)=0 | |||
| Get a symbol from the module. | ||||
| virtual std::string | get_filename ()=0 | |||
| Get the full file name of the module. | ||||
| virtual std::string | get_base_filename ()=0 | |||
| Get the base file name of the module. | ||||
Detailed Description
Interface representing a dynamically loaded software module.
Definition at line 39 of file module.h.
Member Enumeration Documentation
Flags for the loading process.
- Enumerator:
Constructor & Destructor Documentation
| fawkes::Module::~Module | ( | ) | [virtual] |
Member Function Documentation
| bool fawkes::Module::close | ( | ) | [pure virtual] |
Close the module.
- Returns:
- Returns true if the module could be closed, false otherwise
Implemented in fawkes::ModuleDL.
| std::string fawkes::Module::get_base_filename | ( | ) | [pure virtual] |
Get the base file name of the module.
- Returns:
- Returns the base file name of the module. On Unix systems this is everything after the last slash
Implemented in fawkes::ModuleDL.
Referenced by fawkes::ModuleManagerTemplate< MODULE_CLASS >::close_module().
| std::string fawkes::Module::get_filename | ( | ) | [pure virtual] |
Get the full file name of the module.
- Returns:
- Returns a string with the full file name of the module
Implemented in fawkes::ModuleDL.
| unsigned int fawkes::Module::get_ref_count | ( | ) | [pure virtual] |
Get the reference count of this module.
- Returns:
- Returns the number of references to this module
Implemented in fawkes::ModuleDL.
| void * fawkes::Module::get_symbol | ( | const char * | symbol_name | ) | [pure virtual] |
Get a symbol from the module.
- Parameters:
-
symbol_name The name of the symbol.
- Returns:
- Returns a pointer to the symbol or NULL if symbol was not found
Implemented in fawkes::ModuleDL.
Referenced by fawkes::BlackBoardInstanceFactory::delete_interface_instance(), fawkes::PluginLoader::get_description(), and fawkes::BlackBoardInstanceFactory::new_interface_instance().
| bool fawkes::Module::has_symbol | ( | const char * | symbol_name | ) | [pure virtual] |
Check if the module has the given symbol.
- Parameters:
-
symbol_name The name of the symbol.
- Returns:
- Returns true if the symbol was found, false otherwise
Implemented in fawkes::ModuleDL.
Referenced by fawkes::BlackBoardInstanceFactory::delete_interface_instance(), fawkes::PluginLoader::get_description(), and fawkes::BlackBoardInstanceFactory::new_interface_instance().
| bool fawkes::Module::notref | ( | ) | [pure virtual] |
Check if there are no reference to this module.
- Returns:
- Returns true if there are no references to this module, false if there is at least one reference
Implemented in fawkes::ModuleDL.
| void fawkes::Module::open | ( | ) | [pure virtual] |
Open the module
- Exceptions:
-
ModuleOpenException thrown if there was any problem loading the module.
Implemented in fawkes::ModuleDL.
| void fawkes::Module::ref | ( | ) | [pure virtual] |
| void fawkes::Module::unref | ( | ) | [pure virtual] |
Decrease the reference count of this module.
Implemented in fawkes::ModuleDL.
Referenced by fawkes::BlackBoardInstanceFactory::delete_interface_instance().
The documentation for this class was generated from the following files:
- src/libs/utils/system/dynamic_module/module.h
- src/libs/utils/system/dynamic_module/module.cpp

