#include <utils/system/dynamic_module/module.h>
Inheritance diagram for fawkes::Module:
Public Types | ||||
MODULE_FLAGS_NONE = 0 | ||||
No flags. | ||||
MODULE_FLAGS_DEFAULT = 0x000E | ||||
Default flags, these are MODULE_BIND_GLOBAL, MODULE_BIND_NOW and MODULE_BIND_DEEP. | ||||
MODULE_BIND_LAZY = 0x0001 | ||||
Perform lazy binding. | ||||
MODULE_BIND_NOW = 0x0002 | ||||
Resolve all symbols immediately when loading the library. | ||||
MODULE_BIND_LOCAL = 0x0000 | ||||
Symbols defined in this library are not made available to resolve references in subsequently loaded libraries. | ||||
MODULE_BIND_GLOBAL = 0x0004 | ||||
Symbols defined in this library are not made available to resolve references in subsequently loaded libraries. | ||||
MODULE_BIND_MASK = 0x0003 | ||||
Can be used to encode flags in a longer data field. | ||||
MODULE_BIND_DEEP = 0x0008 | ||||
Place the lookup scope of the symbols in this library ahead of the global scope. | ||||
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. |
Definition at line 39 of file module.h.
Flags for the loading process.
fawkes::Module::~Module | ( | ) | [virtual] |
bool fawkes::Module::close | ( | ) | [pure virtual] |
Close the module.
Implemented in fawkes::ModuleDL.
std::string fawkes::Module::get_base_filename | ( | ) | [pure virtual] |
Get the base file name of the module.
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.
Implemented in fawkes::ModuleDL.
unsigned int fawkes::Module::get_ref_count | ( | ) | [pure virtual] |
Get the reference count of this module.
Implemented in fawkes::ModuleDL.
void * fawkes::Module::get_symbol | ( | const char * | symbol_name | ) | [pure virtual] |
Get a symbol from the module.
symbol_name | The name of the symbol. |
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.
symbol_name | The name of the symbol. |
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.
Implemented in fawkes::ModuleDL.
void fawkes::Module::open | ( | ) | [pure virtual] |
Open the module
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().