EHM DAL 0.2.5
Data abstraction layer for Eastside Hockey Manager
Loading...
Searching...
No Matches
schedule_round.h
1#pragma once
2
3// Application headers
4#include "include/tools/schedule_generator/schedule_template_generator/schedule_club.h"
5#include "include/tools/schedule_generator/schedule_template_generator/schedule_game_table.h"
6
7// Qt headers
8#include <QtGlobal>
9#include <vector>
10
11// --- Schedule round --- //
12namespace ehm_dal::tools::schedule_template_generator {
17{
18public:
20
21 // Add data
22 bool add(std::pair<qint32, qint32> &game);
23
24 // Debugging / diagnostics
25 void printDiagnosticData() const;
26
27 // Get data
28 bool contains(const qint32 club_id) const;
29 qint32 count() const;
30
31 // Scheduling
32 void allocate(ScheduleGameTable &schedule,
33 const QDate &date,
34 const std::vector<std::shared_ptr<ScheduleClub>> &clubs);
35
36 // Operator overloading
37 inline auto operator<=>(const ScheduleRound &rhs) const { return count() <=> rhs.count(); }
38 inline bool operator==(const ScheduleRound &rhs) const { return count() == rhs.count(); }
39
40private:
41 std::vector<std::pair<qint32, qint32>> games_;
42};
43} // namespace ehm_dal::tools::schedule_template_generator
The ScheduleGameTable class is a container for ScheduleGames.
Definition: schedule_game_table.h:20
The ScheduleRound class represents a single round of games.
Definition: schedule_round.h:17