KItinerary::FcbUtil

Search for usage in LXR

KItinerary::FcbUtil Class Reference

#include <fcbutil.h>

Static Public Member Functions

static QString classCodeToString (Fcb::v13::TravelClassType classCode)
 
static QString classCodeToString (Fcb::v3::TravelClassType classCode)
 
static QDate decodeDate (int year, std::optional< int > day)
 
static QDate decodeDifferentialDate (const QDate &base, int year, std::optional< int > day)
 
static QDateTime decodeDifferentialEndTime (const QDateTime &baseDt, int day, std::optional< int > time, std::optional< int > utcOffset)
 
static QDateTime decodeDifferentialStartTime (const QDateTime &baseDt, int day, std::optional< int > time, std::optional< int > utcOffset)
 
static QDateTime decodeDifferentialTime (const QDateTime &baseDt, int day, std::optional< int > time, std::optional< int > utcOffset)
 
template<typename CodeTableTypeT, typename T>
static QString fromStationIdentifier (CodeTableTypeT stationCodeTable, const T &doc)
 
template<typename T>
static QString fromStationIdentifier (const T &doc)
 
static QDateTime issuingDateTime (int year, int day, std::optional< int > time)
 
template<typename CodeTableTypeT, typename T>
static QString toStationIdentifier (CodeTableTypeT stationCodeTable, const T &doc)
 
template<typename T>
static QString toStationIdentifier (const T &doc)
 

Detailed Description

Higher-level decoding utilities for ERA FCB ticket data.

Definition at line 18 of file fcbutil.h.

Member Function Documentation

◆ classCodeToString() [1/2]

QString FcbUtil::classCodeToString ( Fcb::v13::TravelClassType classCode)
staticnodiscard

Convert a class code enum value to a string for human representation.

Definition at line 30 of file fcbutil.cpp.

◆ classCodeToString() [2/2]

QString FcbUtil::classCodeToString ( Fcb::v3::TravelClassType classCode)
staticnodiscard

Definition at line 42 of file fcbutil.cpp.

◆ decodeDate()

QDate FcbUtil::decodeDate ( int year,
std::optional< int > day )
staticnodiscard

Decode FCB date.

Definition at line 58 of file fcbutil.cpp.

◆ decodeDifferentialDate()

QDate FcbUtil::decodeDifferentialDate ( const QDate & base,
int year,
std::optional< int > day )
staticnodiscard

Definition at line 67 of file fcbutil.cpp.

◆ decodeDifferentialEndTime()

QDateTime FcbUtil::decodeDifferentialEndTime ( const QDateTime & baseDt,
int day,
std::optional< int > time,
std::optional< int > utcOffset )
staticnodiscard

Definition at line 110 of file fcbutil.cpp.

◆ decodeDifferentialStartTime()

QDateTime FcbUtil::decodeDifferentialStartTime ( const QDateTime & baseDt,
int day,
std::optional< int > time,
std::optional< int > utcOffset )
staticnodiscard

Definition at line 100 of file fcbutil.cpp.

◆ decodeDifferentialTime()

QDateTime FcbUtil::decodeDifferentialTime ( const QDateTime & baseDt,
int day,
std::optional< int > time,
std::optional< int > utcOffset )
staticnodiscard

Decode differential time, relative to baseDt.

Definition at line 86 of file fcbutil.cpp.

◆ fromStationIdentifier() [1/2]

template<typename CodeTableTypeT, typename T>
static QString KItinerary::FcbUtil::fromStationIdentifier ( CodeTableTypeT stationCodeTable,
const T & doc )
inlinestaticnodiscard

Departure station identifier for a travel document, in the format needed for output with our JSON-LD format.

Definition at line 34 of file fcbutil.h.

◆ fromStationIdentifier() [2/2]

template<typename T>
static QString KItinerary::FcbUtil::fromStationIdentifier ( const T & doc)
inlinestaticnodiscard

Definition at line 43 of file fcbutil.h.

◆ issuingDateTime()

QDateTime FcbUtil::issuingDateTime ( int year,
int day,
std::optional< int > time )
staticnodiscard

Decode FCB issuing time.

Definition at line 77 of file fcbutil.cpp.

◆ toStationIdentifier() [1/2]

template<typename CodeTableTypeT, typename T>
static QString KItinerary::FcbUtil::toStationIdentifier ( CodeTableTypeT stationCodeTable,
const T & doc )
inlinestaticnodiscard

Arrival station identifier for a travel document, in the format needed for output with our JSON-LD format.

Definition at line 48 of file fcbutil.h.

◆ toStationIdentifier() [2/2]

template<typename T>
static QString KItinerary::FcbUtil::toStationIdentifier ( const T & doc)
inlinestaticnodiscard

Definition at line 57 of file fcbutil.h.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:52:36 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.