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.h22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/discipline/Sport.h b/src/discipline/Sport.h
index 78968fe..9156b82 100644
--- a/src/discipline/Sport.h
+++ b/src/discipline/Sport.h
@@ -22,11 +22,12 @@ public:
set<QString> getCategories();
QJsonArray getCompetitorsByCategory(QString category);
+ QJsonArray getCompetitorsWithMedal();
// filter to change the current competitor array
- void lastName(QJsonArray& competitors);
- void filterByName(QJsonArray& competitors, QString name);
- void filterByCountry(QJsonArray& competitors, QString nocShort);
+ void lastName(QJsonArray &competitors);
+ void filterByName(QJsonArray &competitors, QString name);
+ void filterByCountry(QJsonArray &competitors, QString nocShort);
// sort functions to change the order of the current competitor array
void sortByName(QJsonArray &competitors);
@@ -58,11 +59,24 @@ private:
* - medalType
* - irk
* [- winnerLoserTie] (only if provided in the discipline?)
+ *
+ * Analysis of where to find the medal winners:
+ *
+ * Search for ... in category name.
+ * - "Bronze"
+ * - "Gold"
+ * - "Final"
+ *
+ * ! ATTENTION !
+ * When searching for "Final" there might be "Final A", "Final B", etc.
+ * The results will only be in ONE of these categories!
+ * -> which is good... cause then we can count occurences.
*/
QJsonObject discipline;
- void filterCompetitors(QJsonArray& competitors, QString attribute, QString filter);
+ void filterCompetitors(QJsonArray &competitors, QString attribute, QString filter);
void sortCompetitors(QJsonArray &competitors, function<bool (const QJsonValue &left, const QJsonValue &right)> compare);
+ QJsonObject createCompetitorWithMedals(QJsonObject medalComp);
};