EHM DAL 0.2.5
Data abstraction layer for Eastside Hockey Manager
Loading...
Searching...
No Matches
comp_basic_rules.h
1#pragma once
2
3// Application headers
4#include "include/schema/abstract_id_table_item.h"
5
6// Qt headers
7class QDataStream;
8#include <memory>
9
10namespace ehm_dal::schema {
11
12// --- Competition basic rules --- //
18{
19public:
20 // Constructor
23
24 // File i/o
25 bool read(QDataStream &in, ehm_dal::database::DatabaseVersion &version) override;
26 bool write(QDataStream &out, ehm_dal::database::DatabaseVersion &version) override;
27
28 // Get data
29 QString text() const override;
30
31 // Initialisation
32 bool init() override;
33
34private:
35 struct Data;
36 std::unique_ptr<Data> data_;
37
38 // Get data
39 QVariant internalData(const qint32 column, const qint32 role) const override;
40
41 // Set data
42 bool setInternalData(const qint32 column,
43 const QVariant &value,
44 const qint32 role,
45 std::vector<qint32> &modified_columns) override;
46};
47} // namespace ehm_dal::schema
The DatabaseVersion class represents the database version number.
Definition: database_version.h:12
The AbstractIdTableItem class represents a row in a Table with an id field.
Definition: abstract_id_table_item.h:26
The CompBasicRules class stores the basic information about a playable competition that is needed for...
Definition: comp_basic_rules.h:18
bool read(QDataStream &in, ehm_dal::database::DatabaseVersion &version) override
Reads a table row from the QDataStream.
QString text() const override
Returns the row's display text. This provides a convenient way to obtain a simple description of the ...
bool write(QDataStream &out, ehm_dal::database::DatabaseVersion &version) override
Writes a table row to the QDataStream.
bool init() override
Initialises the table item members. This only needs to be called once per item.