summaryrefslogtreecommitdiff
path: root/src/discipline/Sport.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/discipline/Sport.h')
-rw-r--r--src/discipline/Sport.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/discipline/Sport.h b/src/discipline/Sport.h
new file mode 100644
index 0000000..9c993fb
--- /dev/null
+++ b/src/discipline/Sport.h
@@ -0,0 +1,41 @@
+
+#ifndef ITAT_CHALLANGE_OLYMPICS_SPORT_H
+#define ITAT_CHALLANGE_OLYMPICS_SPORT_H
+
+
+#include <set>
+
+#include <QJsonObject>
+#include <QJsonDocument>
+#include <QString>
+
+using namespace std;
+
+
+class Sport {
+
+public:
+
+ Sport(QJsonObject discipline) {
+ this->discipline = discipline;
+ }
+
+ set<QString> getCategories();
+ QJsonArray getCompetitorsByCategory(QString category);
+
+ // chainable
+ QJsonObject filterByName(QJsonObject discipline, QString name);
+ QJsonObject filterByCountry(QJsonObject discipline, QString name);
+
+ void setDiscipline(QJsonObject discipline) {
+ this->discipline = discipline;
+ }
+
+private:
+
+ QJsonObject discipline;
+
+};
+
+
+#endif //ITAT_CHALLANGE_OLYMPICS_SPORT_H