diff options
author | Max Horn | 2008-02-04 13:14:52 +0000 |
---|---|---|
committer | Max Horn | 2008-02-04 13:14:52 +0000 |
commit | 3cd1e60e7adb6ca8e25aaf8b66222c2fe7fb5fab (patch) | |
tree | 7722a14a6b22035ddcceac37bd72249a2c189764 /base/plugins.h | |
parent | 5fb7f7a4d66c48be928440c3142b196a479ca94c (diff) | |
download | scummvm-rg350-3cd1e60e7adb6ca8e25aaf8b66222c2fe7fb5fab.tar.gz scummvm-rg350-3cd1e60e7adb6ca8e25aaf8b66222c2fe7fb5fab.tar.bz2 scummvm-rg350-3cd1e60e7adb6ca8e25aaf8b66222c2fe7fb5fab.zip |
Moved common code from Plugin subclasses to class Plugin itself
svn-id: r30787
Diffstat (limited to 'base/plugins.h')
-rw-r--r-- | base/plugins.h | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/base/plugins.h b/base/plugins.h index 9f8383f165..bc65a13644 100644 --- a/base/plugins.h +++ b/base/plugins.h @@ -44,24 +44,30 @@ class OSystem; * plugins. */ class Plugin { +protected: + MetaEngine *_metaengine; + public: - virtual ~Plugin() {} + Plugin() : _metaengine(0) {} + virtual ~Plugin() { + //if (isLoaded()) + //unloadPlugin(); + } // virtual bool isLoaded() const = 0; // TODO - virtual bool loadPlugin() = 0; - virtual void unloadPlugin() = 0; - - virtual const char *getName() const = 0; - virtual const char *getCopyright() const = 0; -// virtual int getVersion() const { return 0; } // TODO! + virtual bool loadPlugin() = 0; // TODO: Rename to load() ? + virtual void unloadPlugin() = 0; // TODO: Rename to unload() ? - virtual GameList getSupportedGames() const = 0; - virtual GameDescriptor findGame(const char *gameid) const = 0; - virtual GameList detectGames(const FSList &fslist) const = 0; + const char *getName() const; + const char *getCopyright() const; - virtual SaveStateList listSaves(const char *target) const = 0; +// virtual int getVersion() const { return 0; } // TODO! - virtual PluginError createInstance(OSystem *syst, Engine **engine) const = 0; + PluginError createInstance(OSystem *syst, Engine **engine) const; + GameList getSupportedGames() const; + GameDescriptor findGame(const char *gameid) const; + GameList detectGames(const FSList &fslist) const; + SaveStateList listSaves(const char *target) const; }; |