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