#include <ModuleManager.h>
Public Types | |
typedef void(* | ModuleInitFunc )(Manager *) |
Public Member Functions | |
ModuleManager (Properties &prop) | |
~ModuleManager () | |
std::string | load (const std::string &file_name) |
Load module. | |
std::string | load (const std::string &file_name, const std::string &init_func) |
void | unload (const std::string &file_name) |
Unload module. | |
void | unloadAll () |
Unload all modules. | |
void * | symbol (const std::string &file_name, const std::string &func_name) throw (ModuleNotFound, SymbolNotFound) |
Look up a named symbol in the module. | |
void | setLoadpath (const std::vector< std::string > &load_path) |
Set default module load path. | |
std::vector< std::string > | getLoadPath () |
void | addLoadpath (const std::vector< std::string > &load_path) |
Add module load path. | |
std::vector< std::string > | getLoadedModules () |
Get loaded module names. | |
std::vector< std::string > | getLoadableModules () |
Get loadable module names. | |
void | allowAbsolutePath () |
Allow absolute load path. | |
void | disallowAbsolutePath () |
Forbid absolute load path. | |
void | allowModuleDownload () |
Allow module download. | |
void | disallowModuleDownload () |
Forbid module download. | |
std::string | findFile (const std::string &fname, const std::vector< std::string > &load_path) |
Search file from load path. | |
bool | fileExist (const std::string &filename) |
Check file existance. | |
std::string | getInitFuncName (const std::string &file_path) |
Create initialize function symbol. | |
Protected Types | |
typedef std::vector< std::string > | StringVector |
typedef StringVector::iterator | StringVectorItr |
typedef StringVector::const_iterator | StringVectorConstItr |
typedef std::map< std::string, DLL > | DllMap |
typedef DllMap::iterator | DllMapItr |
typedef DllMap::const_iterator | DllMapConstItr |
Protected Attributes | |
Properties & | m_properties |
DllMap | m_modules |
StringVector | m_loadPath |
StringVector | m_configPath |
bool | m_downloadAllowed |
bool | m_absoluteAllowed |
std::string | m_initFuncSuffix |
std::string | m_initFuncPrefix |
Classes | |
struct | DLL |
struct | Error |
struct | FileNotFound |
struct | InvalidArguments |
struct | InvalidOperation |
struct | ModuleNotFound |
struct | NotAllowedOperation |
struct | NotFound |
struct | SymbolNotFound |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Add module load path.
|
|
Allow absolute load path.
|
|
Allow module download.
|
|
Forbid absolute load path.
|
|
Forbid module download.
|
|
Check file existance.
|
|
Search file from load path.
|
|
Create initialize function symbol.
|
|
Get loadable module names.
|
|
Get loaded module names.
|
|
|
|
|
|
Load module.
|
|
Set default module load path.
|
|
Look up a named symbol in the module.
|
|
Unload module.
|
|
Unload all modules.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|