EHM DAL 0.2.3
Data abstraction layer for Eastside Hockey Manager
Loading...
Searching...
No Matches
player_info.h
1#pragma once
2
3// Application headers
4#include "include/schema/abstract_table_item.h"
5
6// Qt headers
7class QDataStream;
8#include <memory>
9
10namespace ehm_dal::schema {
11
12// --- Retired numbers --- //
14{
15public:
16 PlayerInfo();
18
19 // File i/o
20 bool read(QDataStream &in, ehm_dal::database::DatabaseVersion &version) override;
21 bool write(QDataStream &out, ehm_dal::database::DatabaseVersion &version) override;
22
23 // Get data
24 QString text() const override;
25
26 // Initialisation
27 bool init() override;
28
29 // Parent data
30 qint32 parentItemId() const override;
31
32private:
33 struct Data;
34 std::unique_ptr<Data> data_;
35
36 // Get data
37 QVariant internalData(const qint32 column, const qint32 role) const override;
38
39 // Set data
40 bool setInternalData(const qint32 column,
41 const QVariant &value,
42 const qint32 role,
43 std::vector<qint32> &modified_columns) override;
44};
45
46} // 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 an id field.
Definition: abstract_table_item.h:31
Definition: player_info.h:14
bool init() override
Initialises the table item members. This only needs to be called once per item.
QString text() const override
Returns the row's display text. This provides a convenient way to obtain a simple description of the ...
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.
qint32 parentItemId() const override
Returns the item id of the items parent item. Applies to tree structures only.