pollymc/api/logic/NullInstance.h

94 lines
1.9 KiB
C
Raw Normal View History

2015-10-11 23:26:31 +05:30
#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 bool setIntendedVersionId(QString) override
{
return false;
}
2015-09-26 07:34:09 +05:30
virtual QString currentVersionId() const override
{
return "Null";
};
2015-09-26 07:34:09 +05:30
virtual QString intendedVersionId() const override
{
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
{
return {};
};
2015-09-26 07:34:09 +05:30
virtual QString instanceConfigFolder() const override
{
return instanceRoot();
};
2015-09-26 07:34:09 +05:30
virtual std::shared_ptr<LaunchTask> createLaunchTask(AuthSessionPtr) override
{
return nullptr;
}
virtual shared_qobject_ptr< Task > createUpdateTask() override
{
return nullptr;
}
2015-09-26 07:34:09 +05:30
virtual std::shared_ptr<Task> createJarModdingTask() override
{
return nullptr;
}
2015-09-26 07:34:09 +05:30
virtual void setShouldUpdate(bool) override
{
};
2015-09-26 07:34:09 +05:30
virtual std::shared_ptr< BaseVersionList > versionList() const override
{
return nullptr;
};
2015-09-26 07:34:09 +05:30
virtual QProcessEnvironment createEnvironment() override
{
return QProcessEnvironment();
}
2015-09-26 07:34:09 +05:30
virtual QMap<QString, QString> getVariables() const override
{
return QMap<QString, QString>();
}
2015-09-26 07:34:09 +05:30
virtual IPathMatcher::Ptr getLogFileMatcher() override
{
return nullptr;
}
2015-09-26 07:34:09 +05:30
virtual QString getLogFileRoot() override
{
return instanceRoot();
}
2015-09-26 07:34:09 +05:30
virtual QString typeName() const override
{
return "Null";
}
bool canExport() const override
{
return false;
}
QStringList verboseDescription(AuthSessionPtr session) override
{
QStringList out;
out << "Null instance - placeholder.";
return out;
}
};