From 9722d5b09351c62e89df86a87723a9dcbec82a3f Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Tue, 17 Apr 2018 22:28:26 +0100 Subject: [PATCH] Move IPluginGameWrapper to proxypluginwrappers.h as it's a wrapper for a plugin. --- src/runner/proxypluginwrappers.h | 51 ++++++++++++++++++++++++++++++++ src/runner/uibasewrappers.h | 49 ------------------------------ 2 files changed, 51 insertions(+), 49 deletions(-) diff --git a/src/runner/proxypluginwrappers.h b/src/runner/proxypluginwrappers.h index 6d724d1..4f104fe 100644 --- a/src/runner/proxypluginwrappers.h +++ b/src/runner/proxypluginwrappers.h @@ -3,6 +3,7 @@ #include +#include #include #include @@ -26,6 +27,56 @@ public: }; +struct IPluginGameWrapper : MOBase::IPluginGame, boost::python::wrapper { + virtual QString gameName() const override { return this->get_override("gameName")(); } + virtual void initializeProfile(const QDir &directory, ProfileSettings settings) const override { + this->get_override("initializeProfile")(directory, settings); + } + virtual QString savegameExtension() const override { return this->get_override("savegameExtension")(); } + virtual QString savegameSEExtension() const override { return this->get_override("savegameSEExtension")(); } + virtual bool isInstalled() const override { return this->get_override("isInstalled")(); } + virtual QIcon gameIcon() const override { return this->get_override("gameIcon")(); } + virtual QDir gameDirectory() const override { return this->get_override("gameDirectory")(); } + virtual QDir dataDirectory() const override { return this->get_override("dataDirectory")(); } + virtual void setGamePath(const QString &path) override { this->get_override("setGamePath")(path); } + virtual QDir documentsDirectory() const override { return this->get_override("documentsDirectory")(); } + virtual QDir savesDirectory() const override { return this->get_override("savesDirectory")(); } + virtual QList executables() const override { return this->get_override("executables")(); } + virtual QString steamAPPId() const override { return this->get_override("steamAPPId")(); } + virtual QStringList primaryPlugins() const override { return this->get_override("primaryPlugins")(); } + virtual QStringList gameVariants() const override { return this->get_override("gameVariants")(); } + virtual void setGameVariant(const QString &variant) override { this->get_override("setGameVariant")(variant); } + virtual QString binaryName() const override { return this->get_override("binaryName")(); } + virtual QString gameShortName() const override { return this->get_override("gameShortName")(); } + virtual QStringList validShortNames() const override { return this->get_override("validShortNames")(); } + virtual QString gameNexusName() const override { return this->get_override("gameNexusName")(); } + virtual QStringList iniFiles() const override { return this->get_override("iniFiles")(); } + virtual QStringList DLCPlugins() const override { return this->get_override("DLCPlugins")(); } + virtual QStringList CCPlugins() const override { return this->get_override("CCPlugins")(); } + virtual LoadOrderMechanism loadOrderMechanism() const override { return this->get_override("loadorderMechanism")(); } + virtual SortMechanism sortMechanism() const override { return this->get_override("sortMechanism")(); } + virtual int nexusModOrganizerID() const override { return this->get_override("nexusModOrganizerID")(); } + virtual int nexusGameID() const override { return this->get_override("nexusGameID")(); } + virtual bool looksValid(QDir const &dir) const override { return this->get_override("looksValid")(dir); } + virtual QString gameVersion() const override { return this->get_override("gameVersion")(); } + virtual QString getLauncherName() const override { return this->get_override("getLauncherName")(); } + + //Plugin interface. Could this bit be implemented just once? + virtual bool init(MOBase::IOrganizer *moInfo) override { return this->get_override("init")(moInfo); } + virtual QString name() const override { return this->get_override("name")(); } + virtual QString author() const override { return this->get_override("author")(); } + virtual QString description() const override { return this->get_override("description")(); } + virtual MOBase::VersionInfo version() const override { return this->get_override("version")(); } + virtual bool isActive() const override { return this->get_override("isActive")(); } + virtual QList settings() const override { return this->get_override("settings")(); } + +protected: + + virtual std::map featureList() const override { return this->get_override("featureList")(); } + +}; + + class IPluginInstallerCustomWrapper : public MOBase::IPluginInstallerCustom, public boost::python::wrapper { Q_OBJECT diff --git a/src/runner/uibasewrappers.h b/src/runner/uibasewrappers.h index 780a506..75db982 100644 --- a/src/runner/uibasewrappers.h +++ b/src/runner/uibasewrappers.h @@ -434,53 +434,4 @@ struct IModListWrapper: MOBase::IModList, boost::python::wrapper { - virtual QString gameName() const override { return this->get_override("gameName")(); } - virtual void initializeProfile(const QDir &directory, ProfileSettings settings) const override { - this->get_override("initializeProfile")(directory, settings); - } - virtual QString savegameExtension() const override { return this->get_override("savegameExtension")(); } - virtual QString savegameSEExtension() const override { return this->get_override("savegameSEExtension")(); } - virtual bool isInstalled() const override { return this->get_override("isInstalled")(); } - virtual QIcon gameIcon() const override { return this->get_override("gameIcon")(); } - virtual QDir gameDirectory() const override { return this->get_override("gameDirectory")(); } - virtual QDir dataDirectory() const override { return this->get_override("dataDirectory")(); } - virtual void setGamePath(const QString &path) override { this->get_override("setGamePath")(path); } - virtual QDir documentsDirectory() const override { return this->get_override("documentsDirectory")(); } - virtual QDir savesDirectory() const override { return this->get_override("savesDirectory")(); } - virtual QList executables() const override { return this->get_override("executables")(); } - virtual QString steamAPPId() const override { return this->get_override("steamAPPId")(); } - virtual QStringList primaryPlugins() const override { return this->get_override("primaryPlugins")(); } - virtual QStringList gameVariants() const override { return this->get_override("gameVariants")(); } - virtual void setGameVariant(const QString &variant) override { this->get_override("setGameVariant")(variant); } - virtual QString binaryName() const override { return this->get_override("binaryName")(); } - virtual QString gameShortName() const override { return this->get_override("gameShortName")(); } - virtual QStringList validShortNames() const override { return this->get_override("validShortNames")(); } - virtual QString gameNexusName() const override { return this->get_override("gameNexusName")(); } - virtual QStringList iniFiles() const override { return this->get_override("iniFiles")(); } - virtual QStringList DLCPlugins() const override { return this->get_override("DLCPlugins")(); } - virtual QStringList CCPlugins() const override { return this->get_override("CCPlugins")(); } - virtual LoadOrderMechanism loadOrderMechanism() const override { return this->get_override("loadorderMechanism")(); } - virtual SortMechanism sortMechanism() const override { return this->get_override("sortMechanism")(); } - virtual int nexusModOrganizerID() const override { return this->get_override("nexusModOrganizerID")(); } - virtual int nexusGameID() const override { return this->get_override("nexusGameID")(); } - virtual bool looksValid(QDir const &dir) const override { return this->get_override("looksValid")(dir); } - virtual QString gameVersion() const override { return this->get_override("gameVersion")(); } - virtual QString getLauncherName() const override { return this->get_override("getLauncherName")(); } - - //Plugin interface. Could this bit be implemented just once? - virtual bool init(MOBase::IOrganizer *moInfo) override { return this->get_override("init")(moInfo); } - virtual QString name() const override { return this->get_override("name")(); } - virtual QString author() const override { return this->get_override("author")(); } - virtual QString description() const override { return this->get_override("description")(); } - virtual MOBase::VersionInfo version() const override { return this->get_override("version")(); } - virtual bool isActive() const override { return this->get_override("isActive")(); } - virtual QList settings() const override { return this->get_override("settings")(); } - -protected: - - virtual std::map featureList() const override { return this->get_override("featureList")(); } - -}; - #endif // UIBASEWRAPPERS_H