Пример #1
0
PluginLoader::PluginKeyList
PluginLoader::Impl::listPluginsNotIn(vector<string> libs) 
{
    Enumeration enumeration;
    enumeration.type = Enumeration::NotInLibraries;
    enumeration.libraryNames = libs;
    return enumeratePlugins(enumeration);
}
Пример #2
0
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];
}    
Пример #3
0
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;
}
Пример #4
0
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;
}
Пример #5
0
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];
}