BASE: PLUGINS: Seperate declaration/definition of StaticPlugins.

- Move declarations inside plugins.h to make it visible to detection/detection.cpp
This commit is contained in:
aryanrawlani28 2020-08-12 18:10:13 +05:30 committed by Eugene Sandulenko
parent 408158edc9
commit b78534dcb0
2 changed files with 20 additions and 15 deletions

View File

@ -58,23 +58,19 @@ const char *Plugin::getEngineId() const {
return nullptr;
}
class StaticPlugin : public Plugin {
public:
StaticPlugin(PluginObject *pluginobject, PluginType type) {
assert(pluginobject);
assert(type < PLUGIN_TYPE_MAX);
_pluginObject = pluginobject;
_type = type;
}
StaticPlugin::StaticPlugin(PluginObject *pluginobject, PluginType type) {
assert(pluginobject);
assert(type < PLUGIN_TYPE_MAX);
_pluginObject = pluginobject;
_type = type;
}
~StaticPlugin() {
delete _pluginObject;
}
virtual bool loadPlugin() { return true; }
virtual void unloadPlugin() {}
};
StaticPlugin::~StaticPlugin() {
delete _pluginObject;
}
bool StaticPlugin::loadPlugin() { return true; }
void StaticPlugin::unloadPlugin() {}
class StaticPluginProvider : public PluginProvider {
public:
StaticPluginProvider() {

View File

@ -215,6 +215,15 @@ public:
virtual const char *getFileName() const { return 0; }
};
class StaticPlugin : public Plugin {
public:
StaticPlugin(PluginObject *pluginobject, PluginType type);
~StaticPlugin();
virtual bool loadPlugin();
virtual void unloadPlugin();
};
/** List of Plugin instances. */
typedef Common::Array<Plugin *> PluginList;