40 lines
782 B
C
40 lines
782 B
C
![]() |
|
||
|
#ifndef ITAT_CHALLANGE_OLYMPICS_COMPETITOR_H
|
||
|
#define ITAT_CHALLANGE_OLYMPICS_COMPETITOR_H
|
||
|
|
||
|
#include <QString>
|
||
|
#include <QMap>
|
||
|
#include <QJsonObject>
|
||
|
#include <stdexcept>
|
||
|
|
||
|
using namespace std;
|
||
|
|
||
|
class Competitor {
|
||
|
|
||
|
public:
|
||
|
Competitor(const Competitor &competitor) {
|
||
|
this->code = competitor.code;
|
||
|
this->name = competitor.name;
|
||
|
this->noc = competitor.noc;
|
||
|
}
|
||
|
|
||
|
Competitor(const QJsonObject &competitor) {
|
||
|
setCompetitor(competitor);
|
||
|
}
|
||
|
|
||
|
QString getCode() { return this->code; }
|
||
|
QString getName() { return this->name; }
|
||
|
QString getNOC() { return this->noc; }
|
||
|
|
||
|
bool setCompetitor(const QJsonObject &competitor);
|
||
|
|
||
|
private:
|
||
|
QString code;
|
||
|
QString name;
|
||
|
QString noc;
|
||
|
|
||
|
};
|
||
|
|
||
|
|
||
|
#endif //ITAT_CHALLANGE_OLYMPICS_COMPETITOR_H
|