MultiMC5/logic/VersionFactory.h

24 lines
575 B
C
Raw Normal View History

2013-07-22 00:01:56 +00:00
#pragma once
#include <QtCore>
2013-08-28 02:38:29 +00:00
struct OneSixVersion;
2013-07-27 09:41:45 +00:00
class Rule;
2013-07-22 00:01:56 +00:00
class FullVersionFactory
{
public:
enum Error
{
AllOK, // all parsed OK
ParseError, // the file was corrupted somehow
UnsupportedVersion // the file was meant for a launcher version we don't support (yet)
} m_error;
QString error_string;
public:
FullVersionFactory();
2013-08-28 02:38:29 +00:00
QSharedPointer<OneSixVersion> parse(QByteArray data);
2013-07-22 00:01:56 +00:00
private:
2013-08-28 02:38:29 +00:00
QSharedPointer<OneSixVersion> parse4(QJsonObject root, QSharedPointer<OneSixVersion> product);
2013-07-27 09:41:45 +00:00
QList<QSharedPointer<Rule> > parse4rules(QJsonObject & baseObj);
2013-07-22 00:01:56 +00:00
};