summaryrefslogtreecommitdiff
path: root/src/model/Competitor.h
blob: 919c2fa2089faca07ae021f054c462bb10c3290f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39

#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