EHM DAL 0.2.5
Data abstraction layer for Eastside Hockey Manager
Loading...
Searching...
No Matches
performance_bonus.h
1#pragma once
2
3// Application headers
4#include "include/schema/abstract_table_item.h"
5
6namespace ehm_dal::schema { // --- Performance bonus --- //
8{
9public:
10 // Constructor
15
16 // File I/O
17 bool read(QDataStream &in, ehm_dal::database::DatabaseVersion &version) override;
18 bool write(QDataStream &out, ehm_dal::database::DatabaseVersion &version) override;
19
20 // Initialisation
21 inline bool init() override { return false; }
22
23 // Operator overloading
24 PerformanceBonus &operator=(PerformanceBonus rhs);
25 auto operator<=>(const PerformanceBonus &rhs) const;
26 bool operator<(const PerformanceBonus &rhs) const;
27
28 // New performance bonus type definitions
29 enum ENUM_PERFORMANCE_BONUSES {
30 PERFORMANCE_BONUS_GAMES_PLAYED = 0,
31 PERFORMANCE_BONUS_GOALS,
32 PERFORMANCE_BONUS_ASSISTS,
33 PERFORMANCE_BONUS_POINTS,
34 PERFORMANCE_BONUS_PP_GOALS,
35 PERFORMANCE_BONUS_SH_GOALS,
36 PERFORMANCE_BONUS_WINS,
37 PERFORMANCE_BONUS_SHUTOUTS,
38 PERFORMANCE_BONUS_GAA, // only checked at season end
39 PERFORMANCE_BONUS_PCT, // only checked at season end
40 PERFORMANCE_BONUS_PLUSMINUS, // only checked at season end
41 MAX_NO_PERFORMANCE_BONUSES
42 };
43
44private:
45 struct Data;
46 std::unique_ptr<Data> data_;
47};
48} // namespace ehm_dal::schema
The DatabaseVersion class represents the database version number.
Definition: database_version.h:12
The AbstractTableItem class represents a row in a Table with no primary key (id/uid) field.
Definition: abstract_table_item.h:23
Definition: performance_bonus.h:8
bool init() override
Initialises the table item members. This only needs to be called once per item.
Definition: performance_bonus.h:21
bool read(QDataStream &in, ehm_dal::database::DatabaseVersion &version) override
Reads a table row from the QDataStream.
bool write(QDataStream &out, ehm_dal::database::DatabaseVersion &version) override
Writes a table row to the QDataStream.