MultiMC5/api/logic/NullInstance.h

78 lines
1.5 KiB
C
Raw Normal View History

2015-10-11 17:56:31 +00:00
#pragma once
#include "BaseInstance.h"
class NullInstance: public BaseInstance
{
public:
NullInstance(SettingsObjectPtr globalSettings, SettingsObjectPtr settings, const QString& rootDir)
:BaseInstance(globalSettings, settings, rootDir)
{
setVersionBroken(true);
}
virtual ~NullInstance() {};
virtual void init() override
{
}
virtual void saveNow() override
{
}
virtual QString getStatusbarDescription() override
{
return tr("Unknown instance type");
};
2017-09-21 22:27:30 +00:00
virtual QSet< QString > traits() const override
{
return {};
};
2015-09-26 02:04:09 +00:00
virtual QString instanceConfigFolder() const override
{
return instanceRoot();
};
2015-09-26 02:04:09 +00:00
virtual std::shared_ptr<LaunchTask> createLaunchTask(AuthSessionPtr) override
{
return nullptr;
}
virtual shared_qobject_ptr< Task > createUpdateTask(Net::Mode mode) override
{
return nullptr;
}
2015-09-26 02:04:09 +00:00
virtual QProcessEnvironment createEnvironment() override
{
return QProcessEnvironment();
}
2015-09-26 02:04:09 +00:00
virtual QMap<QString, QString> getVariables() const override
{
return QMap<QString, QString>();
}
2015-09-26 02:04:09 +00:00
virtual IPathMatcher::Ptr getLogFileMatcher() override
{
return nullptr;
}
2015-09-26 02:04:09 +00:00
virtual QString getLogFileRoot() override
{
return instanceRoot();
}
2015-09-26 02:04:09 +00:00
virtual QString typeName() const override
{
return "Null";
}
bool canExport() const override
{
return false;
}
2017-09-20 21:38:31 +00:00
bool canEdit() const override
{
return false;
}
bool canLaunch() const override
{
return false;
}
QStringList verboseDescription(AuthSessionPtr session) override
{
QStringList out;
out << "Null instance - placeholder.";
return out;
}
};