KItinerary::Uic9183Parser

Search for usage in LXR

#include <uic9183parser.h>

Properties

QString carrierId
 
QString outboundArrivalStationId
 
QString outboundDepartureStationId
 
KItinerary::Person person
 
QString pnr
 
QByteArray rawData
 
QVariant rct2Ticket
 
QString seatingType
 
QVariant ticketLayout
 

Public Member Functions

 Uic9183Parser (const Uic9183Parser &)
 
Q_INVOKABLE QVariant block (const QString &name) const
 
QString carrierId () const
 
Uic9183Block findBlock (const char name[6]) const
 
template<typename T >
findBlock () const
 
Uic9183Block firstBlock () const
 
Uic9183Header header () const
 
bool isValid () const
 
Uic9183Parseroperator= (const Uic9183Parser &)
 
QString outboundArrivalStationId () const
 
QString outboundDepartureStationId () const
 
void parse (const QByteArray &data)
 
Person person () const
 
QString pnr () const
 
QByteArray rawData () const
 
Rct2Ticket rct2Ticket () const
 
QString seatingType () const
 
void setContextDate (const QDateTime &)
 
Uic9183TicketLayout ticketLayout () const
 

Static Public Member Functions

static bool maybeUic9183 (const QByteArray &data)
 

Detailed Description

Property Documentation

Rct2Ticket Uic9183Parser::rct2Ticket
read

RCT2 ticket layout block, if present, null otherwise.

Definition at line 47 of file uic9183parser.h.

Uic9183TicketLayout Uic9183Parser::ticketLayout
read

U_TLAY ticket layout block, if present, null otherwise.

Definition at line 45 of file uic9183parser.h.

Member Function Documentation

QVariant Uic9183Parser::block ( const QString name) const

Same as the above, but for JS usage.

Definition at line 60 of file uic9183parser.cpp.

QString KItinerary::Uic9183Parser::carrierId ( ) const

The UIC carrier code.

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 50 of file uic9183parser.cpp.

template<typename T >
T KItinerary::Uic9183Parser::findBlock ( ) const
inline

Returns the first block of type.

Template Parameters
T.A null block is returned if no such block exists.

Definition at line 98 of file uic9183parser.h.

Uic9183Block Uic9183Parser::firstBlock ( ) const

First data block in this ticket.

Useful for iterating over all blocks.

Definition at line 45 of file uic9183parser.cpp.

Uic9183Header Uic9183Parser::header ( ) const

Header found before the compressed payload.

Definition at line 252 of file uic9183parser.cpp.

bool Uic9183Parser::maybeUic9183 ( const QByteArray data)
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 262 of file uic9183parser.cpp.

QString KItinerary::Uic9183Parser::outboundArrivalStationId ( ) const

Station identifier for the arrival station of the outbound trip.

QString KItinerary::Uic9183Parser::outboundDepartureStationId ( ) const

Station identifier for the departure station of the outbound trip.

Person KItinerary::Uic9183Parser::person ( ) const

The person this ticket is issued to.

QString KItinerary::Uic9183Parser::pnr ( ) const

The booking reference.

QByteArray KItinerary::Uic9183Parser::rawData ( ) const

Raw data of this ticket.

Useful for generating a barcode for it again.

Rct2Ticket KItinerary::Uic9183Parser::rct2Ticket ( ) const

RCT2 ticket layout, if present.

QString KItinerary::Uic9183Parser::seatingType ( ) const
See also
Ticket::seatingType
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 78 of file uic9183parser.cpp.

Uic9183TicketLayout KItinerary::Uic9183Parser::ticketLayout ( ) const

U_TLAY ticket layout block.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Tue Nov 30 2021 23:06:14 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.