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;
|
|
|
|
}
|
2016-08-14 06:03:31 +05:30
|
|
|
virtual shared_qobject_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";
|
|
|
|
}
|
2016-04-28 03:34:37 +05:30
|
|
|
bool canExport() const override
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
2016-06-16 05:50:23 +05:30
|
|
|
QStringList verboseDescription(AuthSessionPtr session) override
|
|
|
|
{
|
|
|
|
QStringList out;
|
|
|
|
out << "Null instance - placeholder.";
|
|
|
|
return out;
|
|
|
|
}
|
2015-02-12 00:26:55 +05:30
|
|
|
};
|