Example #1
0
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);
}
Example #2
0
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;
}
Example #3
0
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;
}