2015-10-11 17:56:31 +00: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 02:04:09 +00:00
|
|
|
virtual QString currentVersionId() const override
|
2015-02-11 18:56:55 +00:00
|
|
|
{
|
|
|
|
return "Null";
|
|
|
|
};
|
2015-09-26 02:04:09 +00: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 02:04:09 +00:00
|
|
|
virtual QSet< QString > traits() override
|
2015-02-11 18:56:55 +00:00
|
|
|
{
|
|
|
|
return {};
|
|
|
|
};
|
2015-09-26 02:04:09 +00:00
|
|
|
virtual QString instanceConfigFolder() const override
|
2015-02-11 18:56:55 +00:00
|
|
|
{
|
|
|
|
return instanceRoot();
|
|
|
|
};
|
2015-09-26 02:04:09 +00:00
|
|
|
virtual std::shared_ptr<LaunchTask> createLaunchTask(AuthSessionPtr) override
|
2015-02-11 18:56:55 +00:00
|
|
|
{
|
|
|
|
return nullptr;
|
|
|
|
}
|
2015-09-26 02:04:09 +00:00
|
|
|
virtual std::shared_ptr< Task > createUpdateTask() override
|
2015-07-09 22:06:05 +00:00
|
|
|
{
|
|
|
|
return nullptr;
|
|
|
|
}
|
2015-09-26 02:04:09 +00:00
|
|
|
virtual std::shared_ptr<Task> createJarModdingTask() override
|
2015-02-11 18:56:55 +00:00
|
|
|
{
|
|
|
|
return nullptr;
|
|
|
|
}
|
2015-09-26 02:04:09 +00:00
|
|
|
virtual void setShouldUpdate(bool) override
|
2015-02-11 18:56:55 +00:00
|
|
|
{
|
|
|
|
};
|
2015-09-26 02:04:09 +00:00
|
|
|
virtual std::shared_ptr< BaseVersionList > versionList() const override
|
2015-02-11 18:56:55 +00:00
|
|
|
{
|
|
|
|
return nullptr;
|
|
|
|
};
|
2015-09-26 02:04:09 +00:00
|
|
|
virtual QProcessEnvironment createEnvironment() override
|
2015-07-21 00:38:15 +00:00
|
|
|
{
|
|
|
|
return QProcessEnvironment();
|
|
|
|
}
|
2015-09-26 02:04:09 +00:00
|
|
|
virtual QMap<QString, QString> getVariables() const override
|
2015-07-21 00:38:15 +00:00
|
|
|
{
|
|
|
|
return QMap<QString, QString>();
|
|
|
|
}
|
2015-09-26 02:04:09 +00:00
|
|
|
virtual IPathMatcher::Ptr getLogFileMatcher() override
|
2015-08-18 00:25:24 +00:00
|
|
|
{
|
|
|
|
return nullptr;
|
|
|
|
}
|
2015-09-26 02:04:09 +00:00
|
|
|
virtual QString getLogFileRoot() override
|
2015-08-19 00:04:56 +00:00
|
|
|
{
|
|
|
|
return instanceRoot();
|
|
|
|
}
|
2015-09-26 02:04:09 +00:00
|
|
|
virtual QString typeName() const override
|
2015-09-21 23:06:45 +00:00
|
|
|
{
|
|
|
|
return "Null";
|
|
|
|
}
|
2016-04-27 22:04:37 +00:00
|
|
|
bool canExport() const override
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
2015-02-11 18:56:55 +00:00
|
|
|
};
|