25 #ifndef __UTILS_SYSTEM_DYNAMIC_MODULE_MODULE_H_ 26 #define __UTILS_SYSTEM_DYNAMIC_MODULE_MODULE_H_ 28 #include <core/exception.h> 101 virtual bool close();
103 virtual void unref();
106 virtual bool has_symbol(
const char *symbol_name);
107 virtual void *
get_symbol(
const char *symbol_name);
115 static const char *FILE_EXTENSION;
118 std::string __filename;
121 unsigned int __ref_count;
virtual void unref()
Decrease the reference count of this module.
virtual bool close()
Close the module.
ModuleOpenException(const char *msg)
Constructor.
BlackBoard::ListenerRegisterFlag operator|(const BlackBoard::ListenerRegisterFlag &a, const BlackBoard::ListenerRegisterFlag &b)
Concatenation of register flags.
virtual void open()
Open the module.
Fawkes library namespace.
virtual void ref()
Increment the reference count of this module.
virtual ~Module()
Destructor.
virtual unsigned int get_ref_count()
Get the reference count of this module.
ModuleFlags
Flags for the loading process.
Can be used to encode flags in a longer data field.
virtual bool notref()
Check if there are no reference to this module.
Symbols defined in this library are not made available to resolve references in subsequently loaded l...
Dynamic module loader for Linux, FreeBSD, and MacOS X.
Base class for exceptions in Fawkes.
Do not unload the library during dlclose().
Symbols defined in this library are not made available to resolve references in subsequently loaded l...
Place the lookup scope of the symbols in this library ahead of the global scope.
virtual std::string get_base_filename()
Get the base file name of the module.
virtual void * get_symbol(const char *symbol_name)
Get a symbol from the module.
virtual bool operator==(const Module &cmod)
Compare to another Module instance.
Default flags, these are MODULE_BIND_GLOBAL, MODULE_BIND_NOW and MODULE_BIND_DEEP.
Module(std::string filename, ModuleFlags flags=MODULE_FLAGS_DEFAULT)
Constructor.
Resolve all symbols immediately when loading the library.
static const char * get_file_extension()
Get file extension for dl modules.
virtual std::string get_filename()
Get the full file name of the module.
virtual bool has_symbol(const char *symbol_name)
Check if the module has the given symbol.