aboutsummaryrefslogtreecommitdiff
path: root/engines/metaengine.h
diff options
context:
space:
mode:
authorMax Horn2008-05-13 10:41:32 +0000
committerMax Horn2008-05-13 10:41:32 +0000
commit2bb39e591f4184f0ae8102c8f547586bf95d2b50 (patch)
tree9b4288df29db3aaace1039badc7ae18d18022edc /engines/metaengine.h
parentfe58f0ee4b9d91f4ed349bafb16d2a8d6fb59faa (diff)
downloadscummvm-rg350-2bb39e591f4184f0ae8102c8f547586bf95d2b50.tar.gz
scummvm-rg350-2bb39e591f4184f0ae8102c8f547586bf95d2b50.tar.bz2
scummvm-rg350-2bb39e591f4184f0ae8102c8f547586bf95d2b50.zip
Moved the engine plugin code to engines/metaengine.h; added/clarified/corrected various Doxygen comments for the plugin system
svn-id: r32083
Diffstat (limited to 'engines/metaengine.h')
-rw-r--r--engines/metaengine.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/engines/metaengine.h b/engines/metaengine.h
index 5db791a1b7..c5fb006faa 100644
--- a/engines/metaengine.h
+++ b/engines/metaengine.h
@@ -93,4 +93,25 @@ public:
}
};
+
+// Engine plugins
+
+typedef PluginSubclass<MetaEngine> EnginePlugin;
+
+/**
+ * Singleton class which manages all Engine plugins.
+ */
+class EngineManager : public Common::Singleton<EngineManager> {
+private:
+ friend class Common::Singleton<SingletonBaseType>;
+
+public:
+ GameDescriptor findGame(const Common::String &gameName, const EnginePlugin **plugin = NULL) const;
+ GameList detectGames(const FSList &fslist) const;
+ const EnginePlugin::list &getPlugins() const;
+};
+
+/** Convenience shortcut for accessing the engine manager. */
+#define EngineMan EngineManager::instance()
+
#endif