KItinerary

uic9183head.h
1/*
2 SPDX-FileCopyrightText: 2021 Volker Krause <vkrause@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "kitinerary_export.h"
10#include "uic9183block.h"
11#include "uic9183utils.h"
12
13#include <QDateTime>
14
15namespace KItinerary {
16
17/** U_HEAD block of a UIC 918.3 ticket container.
18 * @see ERA TAP TSI TD B.12 Digital Security Elements For Rail Passenger Ticketing - ยง10.3.1 Main record (U_HEAD)
19 */
20class KITINERARY_EXPORT Uic9183Head
21{
22 Q_GADGET
23 UIC_NUM_PROPERTY(issuerCompanyCodeNumeric, 0, 4)
24 UIC_STR_PROPERTY(issuerCompanyCodeString, 0, 4)
25 UIC_STR_PROPERTY(ticketKey, 4, 20)
26 Q_PROPERTY(QDateTime issuingDateTime READ issuingDateTime)
27 UIC_NUM_PROPERTY(flags, 36, 1)
28 UIC_STR_PROPERTY(primaryLanguage, 37, 2);
29 UIC_STR_PROPERTY(secondaryLanguage, 39, 2);
30
31public:
33 Uic9183Head(const Uic9183Block &block);
35
36 /** Returns @c true if this is a valid U_HEAD block. */
37 bool isValid() const;
38
39 QDateTime issuingDateTime() const;
40
41 static constexpr const char RecordId[] = "U_HEAD";
42private:
43 Uic9183Block m_data;
44};
45
46}
A data block from a UIC 918.3 ticket.
U_HEAD block of a UIC 918.3 ticket container.
Definition uic9183head.h:21
Classes for reservation/travel data models, data extraction and data augmentation.
Definition berelement.h:17
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:28:48 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.