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