KPublicTransport
uicrailwaycoach.cpp
38 { "AB", VehicleSection::FirstClass | VehicleSection::SecondClass, VehicleSection::NoFeatures, VehicleSection::UnknownType, 1 },
39 { "AR", VehicleSection::FirstClass, VehicleSection::Restaurant, VehicleSection::PassengerCar, 1 },
41 { "BR", VehicleSection::SecondClass, VehicleSection::Restaurant, VehicleSection::PassengerCar, 1 },
42 { "B", VehicleSection::SecondClass, VehicleSection::NoFeatures, VehicleSection::UnknownType, 1 },
43 { "DAB", VehicleSection::FirstClass | VehicleSection::SecondClass, VehicleSection::NoFeatures, VehicleSection::UnknownType, 2 },
44 { "DA", VehicleSection::FirstClass, VehicleSection::NoFeatures, VehicleSection::UnknownType, 2 },
45 { "DB", VehicleSection::SecondClass, VehicleSection::NoFeatures, VehicleSection::UnknownType, 2 },
46 { "DD", VehicleSection::UnknownClass, VehicleSection::NoFeatures, VehicleSection::CarTransportCar, 2 },
47 { "WLAB", VehicleSection::FirstClass | VehicleSection::SecondClass, VehicleSection::NoFeatures, VehicleSection::SleepingCar, 1 },
48 { "WLA", VehicleSection::FirstClass, VehicleSection::NoFeatures, VehicleSection::UnknownType, 1 },
49 { "WLB", VehicleSection::SecondClass, VehicleSection::NoFeatures, VehicleSection::UnknownType, 1 },
50 { "WR", VehicleSection::UnknownClass, VehicleSection::Restaurant, VehicleSection::RestaurantCar, 1 },
51 { "KA", VehicleSection::FirstClass, VehicleSection::NoFeatures, VehicleSection::UnknownType, 1 },
52 { "KB", VehicleSection::SecondClass, VehicleSection::NoFeatures, VehicleSection::UnknownType, 1 },
55VehicleSection::Classes UicRailwayCoach::coachClass(QStringView coachNumber, QStringView coachClassification)
128 { "b", VehicleSection::WheelchairAccessible, VehicleSection::UnknownType, 1 }, // TODO wheelchair accessible toilets specifically
189VehicleSection::Features UicRailwayCoach::features(QStringView coachNumber, QStringView coachClassification)
192 const auto it = std::find_if(std::begin(class_prefix_table), std::end(class_prefix_table), [coachClassification](const auto &prefix) {
221VehicleSection::Type UicRailwayCoach::type(QStringView coachNumber, QStringView coachClassification)
224 const auto it = std::find_if(std::begin(class_prefix_table), std::end(class_prefix_table), [coachClassification](const auto &prefix) {
225 return prefix.type != VehicleSection::UnknownType && coachClassification.startsWith(QLatin1String(prefix.prefix));
235 const auto it2 = std::find_if(std::begin(number_prefix_table), std::end(number_prefix_table), [coachNumber](const auto &prefix) {
236 return prefix.type != VehicleSection::UnknownType && coachNumber.startsWith(QLatin1String(prefix.prefix));
VehicleSection::Features features(QStringView coachNumber, QStringView coachClassification)
Determine coach features from a UIC coachNumber and/or coachClassification.
Definition uicrailwaycoach.cpp:189
int deckCount(QStringView coachNumber, QStringView coachClassification)
Determine the number of decks from a UIC coachNumber and/or coachClassification.
Definition uicrailwaycoach.cpp:164
QStringView countryCode(QStringView coachNumber)
Returns the UIC country code from coachNumber.
Definition uicrailwaycoach.cpp:12
VehicleSection::Type type(QStringView coachNumber, QStringView coachClassification)
Determine the vehicle type from a UIC coachNumber and/or coachClassification.
Definition uicrailwaycoach.cpp:221
VehicleSection::Classes coachClass(QStringView coachNumber, QStringView coachClassification)
Determine the coach class(es) from a UIC coachNumber and/or coachClassification.
Definition uicrailwaycoach.cpp:55
Query operations and data types for accessing realtime public transport information from online servi...
Definition attribution.cpp:16
QStringView mid(qsizetype start, qsizetype length) const const
bool contains(QChar c, Qt::CaseSensitivity cs) const const
qsizetype size() const const
bool startsWith(QChar ch) const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:13:06 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:13:06 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.