KItinerary::Uic9183Parser
#include <uic9183parser.h>
Public Member Functions | |
Uic9183Parser (const Uic9183Parser &) | |
Q_INVOKABLE QVariant | block (const QString &name) const |
QString | carrierId () const |
template<typename T > | |
T | findBlock () const |
Uic9183Block | findBlock (const char name[6]) const |
Uic9183Block | firstBlock () const |
Uic9183Header | header () const |
Organization | issuer () const |
bool | isValid () const |
QString | name () const |
Uic9183Parser & | operator= (const Uic9183Parser &) |
TrainStation | outboundArrivalStation () const |
TrainStation | outboundDepartureStation () const |
void | parse (const QByteArray &data) |
Person | person () const |
QString | pnr () const |
QByteArray | rawData () const |
Rct2Ticket | rct2Ticket () const |
TrainStation | returnArrivalStation () const |
TrainStation | returnDepartureStation () const |
QString | seatingType () const |
void | setContextDate (const QDateTime &) |
Uic9183TicketLayout | ticketLayout () const |
QDateTime | validFrom () const |
QDateTime | validUntil () const |
Static Public Member Functions | |
static bool | maybeUic9183 (const QByteArray &data) |
Detailed Description
Parser for UIC 918.3 and 918.3* train tickets.
- See also
- https://www.era.europa.eu/sites/default/files/filesystem/tap/baseline_1.2.0_archive/era_technical_document_tap_b_7_v1.2.pdf for information about the general UIC 918-3 structure
- https://www.era.europa.eu/sites/default/files/filesystem/tap/baseline_1.2.0_archive/era_technical_document_tap_b_6_v1.2.pdf for information about the U_TLAY block
- https://www.bahn.de/p/view/angebot/regio/barcode.shtml for information about the 0080VU vendor block
Definition at line 37 of file uic9183parser.h.
Property Documentation
◆ carrierId
|
read |
Definition at line 42 of file uic9183parser.h.
◆ issuer
|
read |
Definition at line 43 of file uic9183parser.h.
◆ name
|
read |
Definition at line 41 of file uic9183parser.h.
◆ outboundArrivalStation
|
read |
Definition at line 48 of file uic9183parser.h.
◆ outboundDepartureStation
|
read |
Definition at line 47 of file uic9183parser.h.
◆ person
|
read |
Definition at line 46 of file uic9183parser.h.
◆ pnr
|
read |
Definition at line 40 of file uic9183parser.h.
◆ rawData
|
read |
Definition at line 57 of file uic9183parser.h.
◆ rct2Ticket
|
read |
RCT2 ticket layout block, if present, null
otherwise.
Definition at line 55 of file uic9183parser.h.
◆ returnArrivalStation
|
read |
Definition at line 50 of file uic9183parser.h.
◆ returnDepartureStation
|
read |
Definition at line 49 of file uic9183parser.h.
◆ seatingType
|
read |
Definition at line 51 of file uic9183parser.h.
◆ ticketLayout
|
read |
U_TLAY ticket layout block, if present, null
otherwise.
Definition at line 53 of file uic9183parser.h.
◆ validFrom
|
read |
Definition at line 44 of file uic9183parser.h.
◆ validUntil
|
read |
Definition at line 45 of file uic9183parser.h.
Constructor & Destructor Documentation
◆ Uic9183Parser()
Uic9183Parser::Uic9183Parser | ( | ) |
Definition at line 43 of file uic9183parser.cpp.
Member Function Documentation
◆ block()
Same as the above, but for JS usage.
Definition at line 67 of file uic9183parser.cpp.
◆ carrierId()
QString Uic9183Parser::carrierId | ( | ) | const |
The UIC carrier code.
Definition at line 249 of file uic9183parser.cpp.
◆ findBlock() [1/2]
|
inline |
Returns the first block of type.
- Template Parameters
-
T. A null block is returned if no such block exists.
Definition at line 118 of file uic9183parser.h.
◆ findBlock() [2/2]
Uic9183Block Uic9183Parser::findBlock | ( | const char | name[6] | ) | const |
Returns the first block with the given name.
A null block is returned if no such block exists.
Definition at line 57 of file uic9183parser.cpp.
◆ firstBlock()
Uic9183Block Uic9183Parser::firstBlock | ( | ) | const |
First data block in this ticket.
Useful for iterating over all blocks.
Definition at line 52 of file uic9183parser.cpp.
◆ header()
Uic9183Header Uic9183Parser::header | ( | ) | const |
Header found before the compressed payload.
Definition at line 687 of file uic9183parser.cpp.
◆ issuer()
Organization Uic9183Parser::issuer | ( | ) | const |
Full issuer organization element.
Definition at line 266 of file uic9183parser.cpp.
◆ isValid()
bool Uic9183Parser::isValid | ( | ) | const |
Definition at line 145 of file uic9183parser.cpp.
◆ maybeUic9183()
|
static |
Quickly checks if might
be UIC 918.3 content.
This prioritizes speed over correctness and is used in barcode content auto-detection.
Definition at line 697 of file uic9183parser.cpp.
◆ name()
QString Uic9183Parser::name | ( | ) | const |
Ticket name.
Definition at line 215 of file uic9183parser.cpp.
◆ outboundArrivalStation()
TrainStation Uic9183Parser::outboundArrivalStation | ( | ) | const |
Station object for the arrival station of the outbound trip.
Definition at line 510 of file uic9183parser.cpp.
◆ outboundDepartureStation()
TrainStation Uic9183Parser::outboundDepartureStation | ( | ) | const |
Station object for the departure station of the outbound trip.
Definition at line 470 of file uic9183parser.cpp.
◆ parse()
void Uic9183Parser::parse | ( | const QByteArray & | data | ) |
Definition at line 95 of file uic9183parser.cpp.
◆ person()
Person Uic9183Parser::person | ( | ) | const |
The person this ticket is issued to.
Definition at line 395 of file uic9183parser.cpp.
◆ pnr()
QString Uic9183Parser::pnr | ( | ) | const |
The booking reference.
Definition at line 162 of file uic9183parser.cpp.
◆ rawData()
QByteArray Uic9183Parser::rawData | ( | ) | const |
Raw data of this ticket.
Useful for generating a barcode for it again.
Definition at line 692 of file uic9183parser.cpp.
◆ rct2Ticket()
Rct2Ticket Uic9183Parser::rct2Ticket | ( | ) | const |
RCT2 ticket layout, if present.
Definition at line 670 of file uic9183parser.cpp.
◆ returnArrivalStation()
TrainStation Uic9183Parser::returnArrivalStation | ( | ) | const |
Station object for the arrival station of the return trip.
Definition at line 589 of file uic9183parser.cpp.
◆ returnDepartureStation()
TrainStation Uic9183Parser::returnDepartureStation | ( | ) | const |
Station object for the departure station of the return trip.
Definition at line 549 of file uic9183parser.cpp.
◆ seatingType()
QString Uic9183Parser::seatingType | ( | ) | const |
- See also
- Ticket::seatingType
Definition at line 629 of file uic9183parser.cpp.
◆ setContextDate()
void Uic9183Parser::setContextDate | ( | const QDateTime & | ) |
Date/time this ticket was first encountered.
This is used to recover a missing year in the ticket data.
Definition at line 91 of file uic9183parser.cpp.
◆ ticketLayout()
Uic9183TicketLayout Uic9183Parser::ticketLayout | ( | ) | const |
U_TLAY ticket layout block.
Definition at line 659 of file uic9183parser.cpp.
◆ validFrom()
QDateTime Uic9183Parser::validFrom | ( | ) | const |
Begin of validity.
Definition at line 276 of file uic9183parser.cpp.
◆ validUntil()
QDateTime Uic9183Parser::validUntil | ( | ) | const |
End of validity.
Definition at line 336 of file uic9183parser.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:09:59 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.