diff options
author | Petr Mrázek <peterix@gmail.com> | 2013-08-17 13:40:51 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2013-08-17 13:40:51 +0200 |
commit | 253067c782955380bbf66ac0475dc954375b1ff4 (patch) | |
tree | ca97e231fd3a764256d95b5fc8d08fc25ff72161 /logic/VersionFactory.h | |
parent | 77e80665422c4e97e2286418ab55e20c4030023b (diff) | |
download | MultiMC-253067c782955380bbf66ac0475dc954375b1ff4.tar MultiMC-253067c782955380bbf66ac0475dc954375b1ff4.tar.gz MultiMC-253067c782955380bbf66ac0475dc954375b1ff4.tar.lz MultiMC-253067c782955380bbf66ac0475dc954375b1ff4.tar.xz MultiMC-253067c782955380bbf66ac0475dc954375b1ff4.zip |
Move all the things (YES. Move them.)
Also, implemented some basic modlist logic, to be wired up.
Diffstat (limited to 'logic/VersionFactory.h')
-rw-r--r-- | logic/VersionFactory.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/logic/VersionFactory.h b/logic/VersionFactory.h new file mode 100644 index 00000000..82c5278a --- /dev/null +++ b/logic/VersionFactory.h @@ -0,0 +1,24 @@ +#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); +};
\ No newline at end of file |