Keep separated arrays for each type of plugin

svn-id: r32046
This commit is contained in:
Jordi Vilalta Prat 2008-05-12 01:26:43 +00:00
parent 2c9968fe80
commit 9ba353b9d8
3 changed files with 13 additions and 12 deletions

View file

@ -174,7 +174,7 @@ protected:
class PluginManager : public Common::Singleton<PluginManager> {
typedef Common::List<PluginProvider *> ProviderList;
private:
PluginList _plugins;
PluginList _plugins[PLUGIN_TYPE_MAX];
ProviderList _providers;
bool tryLoadPlugin(Plugin *plugin);
@ -189,9 +189,9 @@ public:
void loadPlugins();
void unloadPlugins();
void unloadPluginsExcept(const Plugin *plugin);
void unloadPluginsExcept(PluginType type, const Plugin *plugin);
const PluginList &getPlugins() { return _plugins; }
const PluginList &getPlugins(PluginType t) { return _plugins[t]; }
};