bool cPluginManager::DoWithPlugin(const AString & a_PluginName, cPluginCallback & a_Callback) { // TODO: Implement locking for plugins PluginMap::iterator itr = m_Plugins.find(a_PluginName); if ((itr == m_Plugins.end()) || (itr->second == NULL)) { return false; } return a_Callback.Item(itr->second); }
bool cPluginManager::ForEachPlugin(cPluginCallback & a_Callback) { // TODO: Implement locking for plugins for (auto & plugin: m_Plugins) { if (a_Callback.Item(plugin.get())) { return false; } } return true; }
bool cPluginManager::DoWithPlugin(const AString & a_PluginName, cPluginCallback & a_Callback) { // TODO: Implement locking for plugins for (auto & plugin: m_Plugins) { if (plugin->GetName() == a_PluginName) { return a_Callback.Item(plugin.get()); } } return false; }