2015-10-11 18:56:31 +01:00
|
|
|
#pragma once
|
2015-02-11 18:56:55 +00:00
|
|
|
#include "BaseInstance.h"
|
|
|
|
|
|
|
|
class NullInstance: public BaseInstance
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
NullInstance(SettingsObjectPtr globalSettings, SettingsObjectPtr settings, const QString& rootDir)
|
|
|
|
:BaseInstance(globalSettings, settings, rootDir)
|
|
|
|
{
|
|
|
|
setFlag(BaseInstance::VersionBrokenFlag);
|
|
|
|
}
|
|
|
|
virtual ~NullInstance() {};
|
|
|
|
virtual bool setIntendedVersionId(QString) override
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
virtual void cleanupAfterRun() override
|
|
|
|
{
|
|
|
|
}
|
2015-09-26 03:04:09 +01:00
|
|
|
virtual QString currentVersionId() const override
|
2015-02-11 18:56:55 +00:00
|
|
|
{
|
|
|
|
return "Null";
|
|
|
|
};
|
2015-09-26 03:04:09 +01:00
|
|
|
virtual QString intendedVersionId() const override
|
2015-02-11 18:56:55 +00:00
|
|
|
{
|
|
|
|
return "Null";
|
|
|
|
};
|
|
|
|
virtual void init() override
|
|
|
|
{
|
|
|
|
};
|
|
|
|
virtual QString getStatusbarDescription() override
|
|
|
|
{
|
|
|
|
return tr("Unknown instance type");
|
|
|
|
};
|
|
|
|
virtual bool shouldUpdate() const override
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
};
|
2015-09-26 03:04:09 +01:00
|
|
|
virtual QSet< QString > traits() override
|
2015-02-11 18:56:55 +00:00
|
|
|
{
|
|
|
|
return {};
|
|
|
|
};
|
2015-09-26 03:04:09 +01:00
|
|
|
virtual QString instanceConfigFolder() const override
|
2015-02-11 18:56:55 +00:00
|
|
|
{
|
|
|
|
return instanceRoot();
|
|
|
|
};
|
2015-09-26 03:04:09 +01:00
|
|
|
virtual std::shared_ptr<LaunchTask> createLaunchTask(AuthSessionPtr) override
|
2015-02-11 18:56:55 +00:00
|
|
|
{
|
|
|
|
return nullptr;
|
|
|
|
}
|
2016-08-14 01:33:31 +01:00
|
|
|
virtual shared_qobject_ptr< Task > createUpdateTask() override
|
2015-07-09 23:06:05 +01:00
|
|
|
{
|
|
|
|
return nullptr;
|
|
|
|
}
|
2015-09-26 03:04:09 +01:00
|
|
|
virtual std::shared_ptr<Task> createJarModdingTask() override
|
2015-02-11 18:56:55 +00:00
|
|
|
{
|
|
|
|
return nullptr;
|
|
|
|
}
|
2015-09-26 03:04:09 +01:00
|
|
|
virtual void setShouldUpdate(bool) override
|
2015-02-11 18:56:55 +00:00
|
|
|
{
|
|
|
|
};
|
2015-09-26 03:04:09 +01:00
|
|
|
virtual std::shared_ptr< BaseVersionList > versionList() const override
|
2015-02-11 18:56:55 +00:00
|
|
|
{
|
|
|
|
return nullptr;
|
|
|
|
};
|
2015-09-26 03:04:09 +01:00
|
|
|
virtual QProcessEnvironment createEnvironment() override
|
2015-07-21 01:38:15 +01:00
|
|
|
{
|
|
|
|
return QProcessEnvironment();
|
|
|
|
}
|
2015-09-26 03:04:09 +01:00
|
|
|
virtual QMap<QString, QString> getVariables() const override
|
2015-07-21 01:38:15 +01:00
|
|
|
{
|
|
|
|
return QMap<QString, QString>();
|
|
|
|
}
|
2015-09-26 03:04:09 +01:00
|
|
|
virtual IPathMatcher::Ptr getLogFileMatcher() override
|
2015-08-18 01:25:24 +01:00
|
|
|
{
|
|
|
|
return nullptr;
|
|
|
|
}
|
2015-09-26 03:04:09 +01:00
|
|
|
virtual QString getLogFileRoot() override
|
2015-08-19 01:04:56 +01:00
|
|
|
{
|
|
|
|
return instanceRoot();
|
|
|
|
}
|
2015-09-26 03:04:09 +01:00
|
|
|
virtual QString typeName() const override
|
2015-09-22 00:06:45 +01:00
|
|
|
{
|
|
|
|
return "Null";
|
|
|
|
}
|
2016-04-27 23:04:37 +01:00
|
|
|
bool canExport() const override
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
2016-06-16 01:20:23 +01:00
|
|
|
QStringList verboseDescription(AuthSessionPtr session) override
|
|
|
|
{
|
|
|
|
QStringList out;
|
|
|
|
out << "Null instance - placeholder.";
|
|
|
|
return out;
|
|
|
|
}
|
2015-02-11 18:56:55 +00:00
|
|
|
};
|