OpenRTM-aist
1.2.1
|
モジュールマネージャクラス [詳解]
#include <ModuleManager.h>
クラス | |
struct | DLLEntity |
DLL管理用構造体 [詳解] | |
class | DllPred |
ロード済みモジュールリスト [詳解] | |
struct | Error |
ファイル・オープン失敗例外処理用構造体 [詳解] | |
struct | FileNotFound |
指定ファイル不明例外処理用構造体 [詳解] | |
struct | InvalidArguments |
指定引数不正時例外処理用構造体 [詳解] | |
struct | InvalidOperation |
指定操作不正時例外処理用構造体 [詳解] | |
struct | ModuleNotFound |
指定モジュール不明例外処理用構造体 [詳解] | |
struct | NotAllowedOperation |
指定操作禁止時例外処理用構造体 [詳解] | |
struct | NotFound |
未実装部,指定モジュール不明例外処理用構造体 [詳解] | |
struct | SymbolNotFound |
指定シンボル不明例外処理用構造体 [詳解] | |
class | UnloadPred |
モジュールアンロードファンクタ [詳解] | |
公開型 | |
typedef void(* | ModuleInitFunc) (Manager *) |
公開メンバ関数 | |
ModuleManager (coil::Properties &prop) | |
コンストラクタ [詳解] | |
~ModuleManager (void) | |
デストラクタ [詳解] | |
std::string | load (const std::string &file_name) |
モジュールのロード [詳解] | |
std::string | load (const std::string &file_name, const std::string &init_func) |
モジュールのロード、初期化 [詳解] | |
void | unload (const std::string &file_name) |
モジュールのアンロード [詳解] | |
void | unloadAll () |
全モジュールのアンロード [詳解] | |
void * | symbol (const std::string &file_name, const std::string &func_name) throw (ModuleNotFound, SymbolNotFound) |
モジュールのシンボルの参照 [詳解] | |
void | setLoadpath (const std::vector< std::string > &load_path) |
モジュールロードパスを指定する [詳解] | |
std::vector< std::string > | getLoadPath () |
モジュールロードパスを取得する [詳解] | |
void | addLoadpath (const std::vector< std::string > &load_path) |
モジュールロードパスを追加する [詳解] | |
std::vector< coil::Properties > | getLoadedModules () |
ロード済みのモジュールリストを取得する [詳解] | |
std::vector< coil::Properties > | getLoadableModules () |
ロード可能モジュールリストを取得する [詳解] | |
void | allowAbsolutePath () |
モジュールの絶対パス指定許可 [詳解] | |
void | disallowAbsolutePath () |
モジュールの絶対パス指定禁止 [詳解] | |
void | allowModuleDownload () |
モジュールのURL指定許可 [詳解] | |
void | disallowModuleDownload () |
モジュールのURL指定禁止 [詳解] | |
std::string | findFile (const std::string &fname, const std::vector< std::string > &load_path) |
LoadPath からのファイルの検索 [詳解] | |
bool | fileExist (const std::string &filename) |
ファイルが存在するかどうかのチェック [詳解] | |
std::string | getInitFuncName (const std::string &file_path) |
初期化関数シンボルを生成する [詳解] | |
限定公開型 | |
typedef std::vector< std::string > | StringVector |
typedef StringVector::iterator | StringVectorItr |
typedef StringVector::const_iterator | StringVectorConstItr |
typedef std::vector< DLLEntity > | DllMap |
typedef DllMap::iterator | DllMapItr |
typedef DllMap::const_iterator | DllMapConstItr |
限定公開メンバ関数 | |
void | removeInvalidModules () |
無効なモジュールプロファイルを削除する [詳解] | |
void | getModuleList (const std::string &lang, coil::vstring &modules) |
指定言語におけるロードパス上のローダブルなファイルリストを返す [詳解] | |
void | addNewFile (const std::string &fpath, coil::vstring &modules) |
キャッシュに無いパスだけmodulesに追加する [詳解] | |
void | getModuleProfiles (const std::string &lang, const coil::vstring &modules, vProperties &modprops) |
指定言語、ファイルリストからモジュールのプロパティを返す [詳解] | |
限定公開変数類 | |
Logger | rtclog |
ロガーストリーム [詳解] | |
coil::Properties & | m_properties |
Module Manager プロパティ [詳解] | |
ObjectManager< const char *, DLLEntity, DllPred > | m_modules |
ロード済みモジュールリスト [詳解] | |
StringVector | m_loadPath |
モジュール・ロード・パス・リスト [詳解] | |
StringVector | m_configPath |
コンフィギュレーション・パス・リスト [詳解] | |
bool | m_downloadAllowed |
モジュールURL指定許可フラグ [詳解] | |
bool | m_absoluteAllowed |
モジュール絶対パス指定許可フラグ [詳解] | |
std::string | m_initFuncSuffix |
初期実行関数サフィックス [詳解] | |
std::string | m_initFuncPrefix |
初期実行関数プリフィックス [詳解] | |
vProperties | m_modprofs |
coil::vstring | m_loadfailmods |
モジュールマネージャクラス
モジュールのロード、アンロードなどを管理するクラス
|
protected |
|
protected |
|
protected |
typedef void(* RTC::ModuleManager::ModuleInitFunc) (Manager *) |
|
protected |
|
protected |
|
protected |
RTC::ModuleManager::ModuleManager | ( | coil::Properties & | prop | ) |
コンストラクタ
コンストラクタ。 設定された Property オブジェクト内の情報を基に初期化を実行する。
prop | 初期化用プロパティ |
RTC::ModuleManager::~ModuleManager | ( | void | ) |
デストラクタ
void RTC::ModuleManager::addLoadpath | ( | const std::vector< std::string > & | load_path | ) |
|
protected |
キャッシュに無いパスだけmodulesに追加する
|
inline |
|
inline |
モジュールのURL指定許可
ロード対象モジュールのURL指定を許可する。 本設定が許可されている場合、モジュールをダウンロードしてロードすることが 許可される。
参照先 m_downloadAllowed.
|
inline |
|
inline |
モジュールのURL指定禁止
ロード対象モジュールのURL指定を禁止する。
参照先 addNewFile(), fileExist(), findFile(), getInitFuncName(), getModuleList(), getModuleProfiles(), m_downloadAllowed, removeInvalidModules().
bool RTC::ModuleManager::fileExist | ( | const std::string & | filename | ) |
ファイルが存在するかどうかのチェック
指定されたファイルが存在するか確認する。
filename | 存在確認対象ファイル名 |
std::string RTC::ModuleManager::findFile | ( | const std::string & | fname, |
const std::vector< std::string > & | load_path | ||
) |
LoadPath からのファイルの検索
指定されたパス内に、指定されたファイルが存在するか確認する。
fname | 検索対象ファイル名 |
load_path | 検索先パスリスト |
std::string RTC::ModuleManager::getInitFuncName | ( | const std::string & | file_path | ) |
初期化関数シンボルを生成する
初期化関数の名称を組み立てる。
file_path | 初期化対象モジュール名称 |
std::vector<coil::Properties> RTC::ModuleManager::getLoadableModules | ( | ) |
std::vector<coil::Properties> RTC::ModuleManager::getLoadedModules | ( | ) |
|
inline |
モジュールロードパスを取得する
設定されているモジュールを検索対象パスリストを取得する。
参照先 addLoadpath(), getLoadableModules(), getLoadedModules(), m_loadPath.
|
protected |
指定言語におけるロードパス上のローダブルなファイルリストを返す
|
protected |
指定言語、ファイルリストからモジュールのプロパティを返す
std::string RTC::ModuleManager::load | ( | const std::string & | file_name | ) |
モジュールのロード
file_name をDLL もしくは共有ライブラリとしてロードする。 file_name は既定のロードパス (manager.modules.load_path) に対する 相対パスで指定する。
Property manager.modules.abs_path_allowed が yes の場合、 ロードするモジュールを絶対パスで指定することができる。
Property manager.modules.download_allowed が yes の場合、 ロードするモジュールをURLで指定することができる。
file_name は絶対パスで指定することができる。 manager.modules.abs_path_allowd が no の場合、 既定のモジュールロードパスから、file_name のモジュールを探しロードする。
file_name | ロード対象モジュール名 |
std::string RTC::ModuleManager::load | ( | const std::string & | file_name, |
const std::string & | init_func | ||
) |
モジュールのロード、初期化
指定したファイルをDLL もしくは共有ライブラリとしてロードするとともに、 指定した初期化用オペレーションを実行する。
file_name | ロード対象モジュール名 |
init_func | 初期化処理用オペレーション |
|
protected |
無効なモジュールプロファイルを削除する
void RTC::ModuleManager::setLoadpath | ( | const std::vector< std::string > & | load_path | ) |
モジュールロードパスを指定する
モジュールロード時に対象モジュールを検索するパスを指定する。
load_path | モジュール検索対象パスリスト |
void* RTC::ModuleManager::symbol | ( | const std::string & | file_name, |
const std::string & | func_name | ||
) | |||
throw | ( | ModuleNotFound, | |
SymbolNotFound | |||
) |
モジュールのシンボルの参照
void RTC::ModuleManager::unload | ( | const std::string & | file_name | ) |
モジュールのアンロード
指定したロード済みモジュールをクローズし、アンロードする。
file_name | アンロード対象モジュール名 |
void RTC::ModuleManager::unloadAll | ( | ) |
全モジュールのアンロード
全てのロード済みモジュールをアンロードする。
|
protected |
モジュール絶対パス指定許可フラグ
|
protected |
コンフィギュレーション・パス・リスト
|
protected |
モジュールURL指定許可フラグ
|
protected |
初期実行関数プリフィックス
|
protected |
初期実行関数サフィックス
|
protected |
|
protected |
モジュール・ロード・パス・リスト
参照元 getLoadPath().
|
protected |
|
protected |
ロード済みモジュールリスト
|
protected |
Module Manager プロパティ
|
protected |
ロガーストリーム