KItinerary::Uic9183Parser

Search for usage in LXR

#include <uic9183parser.h>

Properties

QString carrierId
 
KItinerary::Organization issuer
 
QString name
 
KItinerary::TrainStation outboundArrivalStation
 
KItinerary::TrainStation outboundDepartureStation
 
KItinerary::Person person
 
QString pnr
 
QByteArray rawData
 
QVariant rct2Ticket
 
KItinerary::TrainStation returnArrivalStation
 
KItinerary::TrainStation returnDepartureStation
 
QString seatingType
 
QVariant ticketLayout
 
QDateTime validFrom
 
QDateTime validUntil
 

Public Member Functions

 Uic9183Parser (const Uic9183Parser &)
 
Q_INVOKABLE QVariant block (const QString &name) const
 
QString carrierId () const
 
template<typename 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
 
Uic9183Parseroperator= (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

Property Documentation

◆ carrierId

QString KItinerary::Uic9183Parser::carrierId
read

Definition at line 42 of file uic9183parser.h.

◆ issuer

KItinerary::Organization KItinerary::Uic9183Parser::issuer
read

Definition at line 43 of file uic9183parser.h.

◆ name

QString KItinerary::Uic9183Parser::name
read

Definition at line 41 of file uic9183parser.h.

◆ outboundArrivalStation

KItinerary::TrainStation KItinerary::Uic9183Parser::outboundArrivalStation
read

Definition at line 48 of file uic9183parser.h.

◆ outboundDepartureStation

KItinerary::TrainStation KItinerary::Uic9183Parser::outboundDepartureStation
read

Definition at line 47 of file uic9183parser.h.

◆ person

KItinerary::Person KItinerary::Uic9183Parser::person
read

Definition at line 46 of file uic9183parser.h.

◆ pnr

QString KItinerary::Uic9183Parser::pnr
read

Definition at line 40 of file uic9183parser.h.

◆ rawData

QByteArray KItinerary::Uic9183Parser::rawData
read

Definition at line 57 of file uic9183parser.h.

◆ rct2Ticket

QVariant KItinerary::Uic9183Parser::rct2Ticket
read

RCT2 ticket layout block, if present, null otherwise.

Definition at line 55 of file uic9183parser.h.

◆ returnArrivalStation

KItinerary::TrainStation KItinerary::Uic9183Parser::returnArrivalStation
read

Definition at line 50 of file uic9183parser.h.

◆ returnDepartureStation

KItinerary::TrainStation KItinerary::Uic9183Parser::returnDepartureStation
read

Definition at line 49 of file uic9183parser.h.

◆ seatingType

QString KItinerary::Uic9183Parser::seatingType
read

Definition at line 51 of file uic9183parser.h.

◆ ticketLayout

QVariant KItinerary::Uic9183Parser::ticketLayout
read

U_TLAY ticket layout block, if present, null otherwise.

Definition at line 53 of file uic9183parser.h.

◆ validFrom

QDateTime KItinerary::Uic9183Parser::validFrom
read

Definition at line 44 of file uic9183parser.h.

◆ validUntil

QDateTime KItinerary::Uic9183Parser::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()

QVariant Uic9183Parser::block ( const QString & name) const

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]

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 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()

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 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:
This file is part of the KDE documentation.
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.