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