#ifndef ITAT_CHALLANGE_OLYMPICS_COMPETITORWITHRESULTS_H #define ITAT_CHALLANGE_OLYMPICS_COMPETITORWITHRESULTS_H #include "Competitor.h" #include #include #include #include class CompetitorWithResults : public Competitor { public: CompetitorWithResults(const QJsonObject &competitor) : Competitor(competitor) { if (!competitor.contains("results")) throw invalid_argument("Competitor does not contain results."); QJsonObject results = competitor["results"].toObject(); setResults(results); } bool setResults(const QJsonObject &results); private: QMap results; }; #endif //ITAT_CHALLANGE_OLYMPICS_COMPETITORWITHRESULTS_H