| |
---|
| | //if (plugins.find(p->getName()) != plugins.end()) { |
---|
| | if (pluginNameList.find(p->getName()) != pluginNameList.end()) { |
---|
| | deleteInstance(p); |
---|
| | dlclose(plugin); |
---|
| | } else |
---|
| | // Convertorの場合。 |
---|
| | if (p->getPluginType() == "Convertor") { |
---|
| | convertors.push_back(static_cast<Convertor *>(p)); |
---|
| | //plugins.insert(pair<String,HonokaPluginEntry>(p->getName(),pe)); |
---|
| | } else |
---|
| | if (p->getPluginType() == "Multiple") { |
---|
| | plugins.push_back(pe); |
---|
| | pluginNameList.insert(p->getName()); |
---|
| | for(unsigned int i = 0;i < static_cast<HonokaMultiplePluginBase *>(p)->getPluginCount();i++) |
---|
| | pluginCheck(static_cast<HonokaMultiplePluginBase *>(p)->getPluginInstanceAt(i)); |
---|
| | } else |
---|
| | // PreEditorの場合。 |
---|
| | if (p->getPluginType() == "PreEditor") { |
---|
| | preeditors.push_back(static_cast<PreEditor *>(p)); |
---|
| | //plugins.insert(pair<String,HonokaPluginEntry>(p->getName(),pe)); |
---|
| | if (pluginCheck(p)) { |
---|
| | plugins.push_back(pe); |
---|
| | pluginNameList.insert(p->getName()); |
---|
| | } else { |
---|
| | // どちらでもなければ…。 |
---|
| | deleteInstance(p); |
---|
| | dlclose(plugin); |
---|
| | } |
---|
| | } else { |
---|
| |
---|
| | m_multi = new MultiConvertor(_scim_config,this); |
---|
| | |
---|
| | // 初期化へ。 |
---|
| | init(); |
---|
| | } |
---|
| | bool HonokaInstance::pluginCheck(HonokaPluginBase *p) { |
---|
| | |
---|
| | // Convertorの場合。 |
---|
| | if (p->getPluginType() == "Convertor") { |
---|
| | convertors.push_back(static_cast<Convertor *>(p)); |
---|
| | return true; |
---|
| | } else |
---|
| | // PreEditorの場合。 |
---|
| | if (p->getPluginType() == "PreEditor") { |
---|
| | preeditors.push_back(static_cast<PreEditor *>(p)); |
---|
| | return true; |
---|
| | } |
---|
| | return false; |
---|
| | } |
---|
| | |
---|
| | HonokaInstance::~HonokaInstance() |
---|
| | { |
---|
| |
---|
| | |