20 #ifndef RTC_MODULEMANAGER_H 21 #define RTC_MODULEMANAGER_H 37 #define CONFIG_EXT "manager.modules.config_ext" 38 #define CONFIG_PATH "manager.modules.config_path" 39 #define DETECT_MOD "manager.modules.detect_loadable" 40 #define MOD_LOADPTH "manager.modules.load_path" 41 #define INITFUNC_SFX "manager.modules.init_func_suffix" 42 #define INITFUNC_PFX "manager.modules.init_func_prefix" 43 #define ALLOW_ABSPATH "manager.modules.abs_path_allowed" 44 #define ALLOW_URL "manager.modules.download_allowed" 45 #define MOD_DWNDIR "manager.modules.download_dir" 46 #define MOD_DELMOD "manager.modules.download_cleanup" 47 #define MOD_PRELOAD "manager.modules.preload" 50 #pragma warning( disable : 4290 ) 76 typedef std::vector<coil::Properties> vProperties;
279 std::string
load(
const std::string& file_name);
308 std::string
load(
const std::string& file_name,
309 const std::string& init_func);
328 void unload(
const std::string& file_name);
352 void*
symbol(
const std::string& file_name,
const std::string& func_name)
372 void setLoadpath(
const std::vector<std::string>& load_path);
413 void addLoadpath(
const std::vector<std::string>& load_path);
553 std::string
findFile(
const std::string& fname,
554 const std::vector<std::string>& load_path);
577 bool fileExist(
const std::string& filename);
689 std::string m_filepath;
691 DllPred(
const char* filepath) : m_filepath(filepath) {}
783 #pragma warning( default : 4290 ) 786 #endif // RTC_MODULEMANAGER_H void(* ModuleInitFunc)(Manager *)
Definition: ModuleManager.h:232
未実装部,指定モジュール不明例外処理用構造体
Definition: ModuleManager.h:136
std::string getInitFuncName(const std::string &file_path)
初期化関数シンボルを生成する
NotAllowedOperation(const std::string &_reason)
Definition: ModuleManager.h:199
bool m_absoluteAllowed
モジュール絶対パス指定許可フラグ
Definition: ModuleManager.h:738
void operator()(DLLEntity *dll)
Definition: ModuleManager.h:769
NotFound(const std::string &_name)
Definition: ModuleManager.h:138
ファイル・オープン失敗例外処理用構造体
Definition: ModuleManager.h:121
void addLoadpath(const std::vector< std::string > &load_path)
モジュールロードパスを追加する
coil::Properties & m_properties
Module Manager プロパティ
Definition: ModuleManager.h:678
ロード済みモジュールリスト
Definition: ModuleManager.h:687
Error(const std::string &_reason)
Definition: ModuleManager.h:123
~ModuleManager(void)
デストラクタ
InvalidArguments(const std::string &_reason)
Definition: ModuleManager.h:214
ObjectManager< const char *, DLLEntity, DllPred > m_modules
ロード済みモジュールリスト
Definition: ModuleManager.h:705
coil::DynamicLib dll
Definition: ModuleManager.h:659
void setLoadpath(const std::vector< std::string > &load_path)
モジュールロードパスを指定する
coil::vstring m_loadfailmods
Definition: ModuleManager.h:777
void disallowAbsolutePath()
モジュールの絶対パス指定禁止
Definition: ModuleManager.h:485
std::string reason
Definition: ModuleManager.h:125
coil::Properties properties
Definition: ModuleManager.h:658
Manager クラス
Definition: Manager.h:81
ModuleNotFound(const std::string &_name)
Definition: ModuleManager.h:169
指定シンボル不明例外処理用構造体
Definition: ModuleManager.h:181
std::string load(const std::string &file_name)
モジュールのロード
void allowAbsolutePath()
モジュールの絶対パス指定許可
Definition: ModuleManager.h:467
DllMap::const_iterator DllMapConstItr
Definition: ModuleManager.h:668
モジュールアンロードファンクタ
Definition: ModuleManager.h:765
const std::string & getProperty(const std::string &key) const
指定されたキーを持つプロパティを、プロパティリストから探す
void disallowModuleDownload()
モジュールのURL指定禁止
Definition: ModuleManager.h:525
std::vector< coil::Properties > getLoadedModules()
ロード済みのモジュールリストを取得する
InvalidOperation(const std::string &_reason)
Definition: ModuleManager.h:229
bool m_downloadAllowed
モジュールURL指定許可フラグ
Definition: ModuleManager.h:730
指定操作不正時例外処理用構造体
Definition: ModuleManager.h:226
DynamicLib クラス
Definition: DynamicLib.h:48
std::vector< std::string > vstring
Definition: stringutil.h:45
StringVector m_loadPath
モジュール・ロード・パス・リスト
Definition: ModuleManager.h:714
Logger rtclog
ロガーストリーム
Definition: ModuleManager.h:647
StringVector m_configPath
コンフィギュレーション・パス・リスト
Definition: ModuleManager.h:722
指定引数不正時例外処理用構造体
Definition: ModuleManager.h:211
bool fileExist(const std::string &filename)
ファイルが存在するかどうかのチェック
void addNewFile(const std::string &fpath, coil::vstring &modules)
キャッシュに無いパスだけmodulesに追加する
オブジェクト管理用クラス
Definition: ObjectManager.h:51
StringVector::iterator StringVectorItr
Definition: ModuleManager.h:663
指定モジュール不明例外処理用構造体
Definition: ModuleManager.h:166
void removeInvalidModules()
無効なモジュールプロファイルを削除する
Logger クラス
Definition: SystemLogger.h:99
std::vector< std::string > StringVector
Definition: ModuleManager.h:662
virtual int close(void)
動的リンクライブラリのアンロード
DllPred(const char *filepath)
Definition: ModuleManager.h:691
モジュールマネージャクラス
Definition: ModuleManager.h:74
vProperties m_modprofs
Definition: ModuleManager.h:776
std::vector< coil::Properties > getLoadableModules()
ロード可能モジュールリストを取得する
std::vector< std::string > getLoadPath()
モジュールロードパスを取得する
Definition: ModuleManager.h:391
bool operator()(DLLEntity *dllentity)
Definition: ModuleManager.h:693
プロパティセットを表現するクラス
Definition: Properties.h:101
void unloadAll()
全モジュールのアンロード
指定ファイル不明例外処理用構造体
Definition: ModuleManager.h:151
StringVector::const_iterator StringVectorConstItr
Definition: ModuleManager.h:664
void * symbol(const std::string &file_name, const std::string &func_name)
モジュールのシンボルの参照
DLL管理用構造体
Definition: ModuleManager.h:656
Property list class (derived from Java Properties)
void unload(const std::string &file_name)
モジュールのアンロード
void allowModuleDownload()
モジュールのURL指定許可
Definition: ModuleManager.h:507
ModuleManager(coil::Properties &prop)
コンストラクタ
DllPred(const DLLEntity *dll)
Definition: ModuleManager.h:692
void getModuleProfiles(const std::string &lang, const coil::vstring &modules, vProperties &modprops)
指定言語、ファイルリストからモジュールのプロパティを返す
std::vector< DLLEntity > DllMap
Definition: ModuleManager.h:666
std::string findFile(const std::string &fname, const std::vector< std::string > &load_path)
LoadPath からのファイルの検索
UnloadPred()
Definition: ModuleManager.h:768
DllMap::iterator DllMapItr
Definition: ModuleManager.h:667
void getModuleList(const std::string &lang, coil::vstring &modules)
指定言語におけるロードパス上のローダブルなファイルリストを返す
std::string m_initFuncSuffix
初期実行関数サフィックス
Definition: ModuleManager.h:747
指定操作禁止時例外処理用構造体
Definition: ModuleManager.h:196
std::string m_initFuncPrefix
初期実行関数プリフィックス
Definition: ModuleManager.h:756
FileNotFound(const std::string &_name)
Definition: ModuleManager.h:154
SymbolNotFound(const std::string &_name)
Definition: ModuleManager.h:184
std::string name
Definition: ModuleManager.h:140