EHM DAL 0.2.3
Data abstraction layer for Eastside Hockey Manager
Loading...
Searching...
No Matches
club_competition_history.h
1#pragma once
2
3
4// Application headers
5#include "include/schema/abstract_table_item.h"
6
7// Qt headers
8class QDataStream;
9#include <memory>
10
11namespace ehm_dal::schema {
12
13// --- Club competition history --- //
15{
16public:
19
20 // File i/o
21 bool read(QDataStream &in, ehm_dal::database::DatabaseVersion &version) override;
22 bool write(QDataStream &out, ehm_dal::database::DatabaseVersion &version) override;
23
24 // Get data
25 QString text() const override;
26
27 // Initialisation
28 bool init() override;
29
30 // Operator overloading
31 bool operator<(const ClubCompetitionHistory &rhs) const;
32
33 // Parent data
34 qint32 parentItemId() const override;
35
36private:
37 struct Data;
38 std::unique_ptr<Data> data_;
39
40 // Get data
41 bool deletable() const override;
42 QVariant internalData(const qint32 column, const qint32 role) const override;
43
44 // Set data
45 bool setInternalData(const qint32 column,
46 const QVariant &value,
47 const qint32 role,
48 std::vector<qint32> &modified_columns) override;
49};
50
51} // namespace ehm_dal::schema
52
53
The DatabaseVersion class represents the database version number.
Definition: database_version.h:12
The AbstractTableItem class represents a row in a Table with an id field.
Definition: abstract_table_item.h:31
Definition: club_competition_history.h:15
bool init() override
Initialises the table item members. This only needs to be called once per item.
bool write(QDataStream &out, ehm_dal::database::DatabaseVersion &version) override
Writes a table row to the QDataStream.
qint32 parentItemId() const override
Returns the item id of the items parent item. Applies to tree structures only.
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 ...