EHM DAL 0.2.5
Data abstraction layer for Eastside Hockey Manager
|
The AbstractTableItem class represents a row in a Table with no primary key (id/uid) field. More...
#include <abstract_table_item.h>
Public Member Functions | |
AbstractTableItem () | |
Default constructor. | |
virtual | ~AbstractTableItem () |
Default destructor. | |
virtual bool | read (QDataStream &in, ehm_dal::database::DatabaseVersion &version) |
Reads a table row from the QDataStream . | |
virtual bool | write (QDataStream &out, ehm_dal::database::DatabaseVersion &version) |
Writes a table row to the QDataStream . | |
virtual bool | init ()=0 |
Initialises the table item members. This only needs to be called once per item. | |
Protected Member Functions | |
virtual bool | deletable () const |
template<IntegralNumber T> | |
QVariant | fromHexVector (const std::vector< T > &raw_data, const qint32 role) const |
QVariant | fromValue (const QVariant &value, const qint32 role) const |
Returns a value as a QVariant if the role is Qt::DisplayRole or Qt::EditRole . A blank QVariant is returned if another role is selected. | |
The AbstractTableItem class represents a row in a Table with no primary key (id/uid) field.
|
protected |
Returns a value
as a QVariant
if the role
is Qt::DisplayRole
or Qt::EditRole
. A blank QVariant
is returned if another role
is selected.
value | Value to be returned |
role | Data role |
QVariant
|
inlinepure virtual |
Initialises the table item members. This only needs to be called once per item.
true
if members were initialised or false
if nothing requires initialising. Implemented in ehm_dal::schema::Affiliation, ehm_dal::schema::Arena, ehm_dal::schema::City, ehm_dal::schema::Club, ehm_dal::schema::ClubHistory, ehm_dal::schema::ClubNameHistory, ehm_dal::schema::ClubRecords, ehm_dal::schema::RetiredNumber, ehm_dal::schema::ClubCompetition, ehm_dal::schema::ClubCompetitionHistory, ehm_dal::schema::Colour, ehm_dal::schema::CompBasicRules, ehm_dal::schema::CompLeagueConference, ehm_dal::schema::CompLeagueDivision, ehm_dal::schema::CompLeagueRules, ehm_dal::schema::CompLeagueStructure, ehm_dal::schema::CompStageStructure, ehm_dal::schema::ScheduleDate, ehm_dal::schema::TvDate, ehm_dal::schema::Continent, ehm_dal::schema::Currency, ehm_dal::schema::DatabaseHeader, ehm_dal::schema::Draft, ehm_dal::schema::FinanceInfo, ehm_dal::schema::GameBasicData, ehm_dal::schema::GameExtraData, ehm_dal::schema::Injury, ehm_dal::schema::Name, ehm_dal::schema::Nation, ehm_dal::schema::Person, ehm_dal::schema::RulingBody, ehm_dal::schema::ScheduleTemplate, ehm_dal::schema::ScheduleTemplateGame, ehm_dal::schema::ContractDetails, ehm_dal::schema::AwardBonus, ehm_dal::schema::PerformanceBonus, ehm_dal::schema::DraftHistory, ehm_dal::schema::NonPlayerData, ehm_dal::schema::PlayerData, ehm_dal::schema::PlayerInfo, ehm_dal::schema::PlayerRights, ehm_dal::schema::StaffHistory, ehm_dal::schema::StaffInfo, ehm_dal::schema::StaffPreferences, ehm_dal::schema::StaffAward, ehm_dal::schema::StaffAwardHistory, ehm_dal::schema::StageName, ehm_dal::schema::State, ehm_dal::schema::TransferRules, ehm_dal::schema::DeadlineDate, and ehm_dal::schema::TransferWindow.
|
virtual |
Reads a table row from the QDataStream
.
in | QDataStream to be parsed |
version | EHM database version |
Reimplemented in ehm_dal::schema::Affiliation, ehm_dal::schema::Arena, ehm_dal::schema::City, ehm_dal::schema::Club, ehm_dal::schema::ClubHistory, ehm_dal::schema::ClubNameHistory, ehm_dal::schema::ClubRecords, ehm_dal::schema::RetiredNumber, ehm_dal::schema::ClubCompetition, ehm_dal::schema::ClubCompetitionHistory, ehm_dal::schema::Colour, ehm_dal::schema::CompBasicRules, ehm_dal::schema::CompLeagueConference, ehm_dal::schema::CompLeagueDivision, ehm_dal::schema::CompLeagueRules, ehm_dal::schema::CompLeagueStructure, ehm_dal::schema::CompStageStructure, ehm_dal::schema::ScheduleDate, ehm_dal::schema::TvDate, ehm_dal::schema::Continent, ehm_dal::schema::Currency, ehm_dal::schema::DatabaseHeader, ehm_dal::schema::Draft, ehm_dal::schema::FinanceInfo, ehm_dal::schema::GameBasicData, ehm_dal::schema::GameExtraData, ehm_dal::schema::Injury, ehm_dal::schema::Name, ehm_dal::schema::Nation, ehm_dal::schema::Official, ehm_dal::schema::RulingBody, ehm_dal::schema::ScheduleTemplate, ehm_dal::schema::ScheduleTemplateGame, ehm_dal::schema::Staff, ehm_dal::schema::ContractDetails, ehm_dal::schema::AwardBonus, ehm_dal::schema::PerformanceBonus, ehm_dal::schema::DraftHistory, ehm_dal::schema::NonPlayerData, ehm_dal::schema::PlayerData, ehm_dal::schema::PlayerInfo, ehm_dal::schema::PlayerRights, ehm_dal::schema::StaffHistory, ehm_dal::schema::StaffInfo, ehm_dal::schema::StaffPreferences, ehm_dal::schema::StaffAward, ehm_dal::schema::StaffAwardHistory, ehm_dal::schema::StageName, ehm_dal::schema::State, ehm_dal::schema::TransferRules, ehm_dal::schema::DeadlineDate, and ehm_dal::schema::TransferWindow.
|
virtual |
Writes a table row to the QDataStream
.
out | QDataStream to be output to |
version | EHM database version |
Reimplemented in ehm_dal::schema::Affiliation, ehm_dal::schema::Arena, ehm_dal::schema::City, ehm_dal::schema::Club, ehm_dal::schema::ClubHistory, ehm_dal::schema::ClubNameHistory, ehm_dal::schema::ClubRecords, ehm_dal::schema::RetiredNumber, ehm_dal::schema::ClubCompetition, ehm_dal::schema::ClubCompetitionHistory, ehm_dal::schema::Colour, ehm_dal::schema::CompBasicRules, ehm_dal::schema::CompLeagueConference, ehm_dal::schema::CompLeagueDivision, ehm_dal::schema::CompLeagueRules, ehm_dal::schema::CompLeagueStructure, ehm_dal::schema::CompStageStructure, ehm_dal::schema::ScheduleDate, ehm_dal::schema::TvDate, ehm_dal::schema::Continent, ehm_dal::schema::Currency, ehm_dal::schema::DatabaseHeader, ehm_dal::schema::Draft, ehm_dal::schema::FinanceInfo, ehm_dal::schema::GameBasicData, ehm_dal::schema::GameExtraData, ehm_dal::schema::Injury, ehm_dal::schema::Name, ehm_dal::schema::Nation, ehm_dal::schema::Official, ehm_dal::schema::RulingBody, ehm_dal::schema::ScheduleTemplate, ehm_dal::schema::ScheduleTemplateGame, ehm_dal::schema::Staff, ehm_dal::schema::ContractDetails, ehm_dal::schema::AwardBonus, ehm_dal::schema::PerformanceBonus, ehm_dal::schema::DraftHistory, ehm_dal::schema::NonPlayerData, ehm_dal::schema::PlayerData, ehm_dal::schema::PlayerInfo, ehm_dal::schema::PlayerRights, ehm_dal::schema::StaffHistory, ehm_dal::schema::StaffInfo, ehm_dal::schema::StaffPreferences, ehm_dal::schema::StaffAward, ehm_dal::schema::StaffAwardHistory, ehm_dal::schema::StageName, ehm_dal::schema::State, ehm_dal::schema::TransferRules, ehm_dal::schema::DeadlineDate, and ehm_dal::schema::TransferWindow.