EHM DAL 0.2.5
Data abstraction layer for Eastside Hockey Manager
Loading...
Searching...
No Matches
schedule_game.h
1#pragma once
2
3// Qt headers
4#include <QDate>
5#include <memory>
6
7// --- Schedule generator game item --- //
8namespace ehm_dal::tools::schedule_template_generator {
9
10class ScheduleClub;
11
16{
17public:
19
20 // Get data
21 inline QDate date() const { return date_; }
22 qint32 homeClubEncodedId() const;
23 qint32 roadClubEncodedId() const;
24
25 // Set data
26 inline void addDays(const qint32 days) { date_ = date_.addDays(days); }
27 void set(const std::shared_ptr<ScheduleClub> road_club,
28 const std::shared_ptr<ScheduleClub> home_club,
29 const QDate &date);
30 inline void setDate(const QDate &date) { date_ = date; }
31 inline void setYear(const qint32 year) { date_.setDate(year, date_.month(), date_.day()); }
32
33private:
34 // Clubs
35 std::shared_ptr<ScheduleClub> home_club_;
36 std::shared_ptr<ScheduleClub> road_club_;
37
38 // Date
39 QDate date_;
40
41 enum ENUM_FLAGS { INVALID = -1 };
42};
43} // namespace ehm_dal::tools::schedule_template_generator
The ScheduleGame class represents a game within ScheduleTemplateGenerator.
Definition: schedule_game.h:16