KItinerary

trainstationdb.h
1/*
2 SPDX-FileCopyrightText: 2018 Volker Krause <vkrause@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "kitinerary_export.h"
10
11#include "countrydb.h"
12#include "iatacode.h"
13#include "knowledgedb.h"
14#include "stationidentifier.h"
15
16#include <cstdint>
17
18class QString;
19
20namespace KItinerary {
21
22namespace KnowledgeDb {
23
24/** Position in the train station database. */
26 using UnalignedNumber<2>::UnalignedNumber;
27};
28
29/** Train station id to station index lookup table structure. */
30template <typename T>
32 constexpr bool operator<(const TrainStationIdIndex &other) const
33 {
34 return stationId < other.stationId;
35 }
36 constexpr bool operator<(T otherId) const
37 {
38 return stationId < otherId;
39 }
40
41 T stationId;
42 TrainStationIndex stationIndex;
43};
44
45/** Train station entry in the station table.
46 * @note This is not for use in APIs/ABIs, but matches the binary layout of the database.
47 */
49 Coordinate coordinate;
50 CountryId country;
51};
52
53
54/** Lookup train station data by IBNR. */
55KITINERARY_EXPORT TrainStation stationForIbnr(IBNR ibnr);
56
57/** Lookup train station data by UIC station id. */
58KITINERARY_EXPORT TrainStation stationForUic(UICStation uic);
59
60/** Lookup train station data by SNCF station id. */
61KITINERARY_EXPORT TrainStation stationForSncfStationId(SncfStationId sncfId);
62
63/** Lookup train station data by Indian Railways station code. */
64KITINERARY_EXPORT TrainStation stationForIndianRailwaysStationCode(const QString &code);
65
66/** Lookup train station data by VR (Finland) station code. */
67KITINERARY_EXPORT TrainStation stationForVRStationCode(VRStationCode vrStation);
68
69/** Lookup train station data by Benerail station identifier. */
71
72/** Lookup train station data by IATA location code. */
73KITINERARY_EXPORT TrainStation stationForIataCode(IataCode iataCode);
74
75/** Lookup train station data by Amtrak station code. */
77
78/** Lookup train station data by Via Rail station code. */
80
81/** Lookup train station data by UK railway station code. */
83}
84}
85
Position in the train station database.
Unalinged storage of a numerical value.
Definition knowledgedb.h:59
TrainStation stationForViaRailStationCode(ViaRailStationCode code)
Lookup train station data by Via Rail station code.
TrainStation stationForUkRailwayStationCode(UKRailwayStationCode code)
Lookup train station data by UK railway station code.
TrainStation stationForIbnr(IBNR ibnr)
Lookup train station data by IBNR.
TrainStation stationForAmtrakStationCode(AmtrakStationCode code)
Lookup train station data by Amtrak station code.
TrainStation stationForUic(UICStation uic)
Lookup train station data by UIC station id.
TrainStation stationForIndianRailwaysStationCode(const QString &code)
Lookup train station data by Indian Railways station code.
TrainStation stationForSncfStationId(SncfStationId sncfId)
Lookup train station data by SNCF station id.
TrainStation stationForVRStationCode(VRStationCode vrStation)
Lookup train station data by VR (Finland) station code.
TrainStation stationForIataCode(IataCode iataCode)
Lookup train station data by IATA location code.
TrainStation stationForBenerailId(BenerailStationId id)
Lookup train station data by Benerail station identifier.
Classes for reservation/travel data models, data extraction and data augmentation.
Definition berelement.h:17
Geographical coordinate.
Definition knowledgedb.h:27
Train station id to station index lookup table structure.
Train station entry in the station table.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:56:37 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.