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