PluginLoader::PluginKeyList PluginLoader::Impl::listPluginsNotIn(vector<string> libs) { Enumeration enumeration; enumeration.type = Enumeration::NotInLibraries; enumeration.libraryNames = libs; return enumeratePlugins(enumeration); }
string PluginLoader::Impl::getLibraryPathForPlugin(PluginKey plugin) { if (m_pluginLibraryNameMap.find(plugin) == m_pluginLibraryNameMap.end()) { if (m_allPluginsEnumerated) return ""; enumeratePlugins(plugin); } if (m_pluginLibraryNameMap.find(plugin) == m_pluginLibraryNameMap.end()) { return ""; } return m_pluginLibraryNameMap[plugin]; }
vector<PluginLoader::PluginKey> PluginLoader::Impl::listPlugins() { if (!m_allPluginsEnumerated) enumeratePlugins(); vector<PluginKey> plugins; for (map<PluginKey, string>::iterator mi = m_pluginLibraryNameMap.begin(); mi != m_pluginLibraryNameMap.end(); ++mi) { plugins.push_back(mi->first); } return plugins; }
PluginLoader::PluginKeyList PluginLoader::Impl::listPlugins() { if (!m_allPluginsEnumerated) enumeratePlugins(Enumeration()); vector<PluginKey> plugins; for (map<PluginKey, string>::const_iterator i = m_pluginLibraryNameMap.begin(); i != m_pluginLibraryNameMap.end(); ++i) { plugins.push_back(i->first); } return plugins; }
string PluginLoader::Impl::getLibraryPathForPlugin(PluginKey plugin) { if (m_pluginLibraryNameMap.find(plugin) == m_pluginLibraryNameMap.end()) { if (m_allPluginsEnumerated) return ""; Enumeration enumeration; enumeration.type = Enumeration::SinglePlugin; enumeration.key = plugin; enumeratePlugins(enumeration); } if (m_pluginLibraryNameMap.find(plugin) == m_pluginLibraryNameMap.end()) { return ""; } return m_pluginLibraryNameMap[plugin]; }