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