pollymc/backend/VersionFactory.h
Petr Mrázek 7e78a422e8 Version filtering and general related code sanitization.
Version list dialog has alternating row background set.
Nostalgia versions, based on OneSix.
2013-08-11 19:05:22 +02:00

24 lines
567 B
C++

#pragma once
#include <QtCore>
struct FullVersion;
class Rule;
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();
QSharedPointer<FullVersion> parse(QByteArray data);
private:
QSharedPointer<FullVersion> parse4(QJsonObject root, QSharedPointer<FullVersion> product);
QList<QSharedPointer<Rule> > parse4rules(QJsonObject & baseObj);
};