KItinerary::KnowledgeDb

KItinerary::KnowledgeDb Namespace Reference

Classes

struct  Airport
 
class  AlphaId
 
class  BenerailStationId
 
struct  Coordinate
 
struct  Country
 
class  FiveAlphaId
 
class  IBNR
 
class  SncfStationId
 
struct  TrainStation
 
struct  TrainStationIdIndex
 
class  TrainStationIndex
 
class  UICIdentiferBase
 
class  UICStation
 
class  UnalignedNumber
 
class  VRStationCode
 

Typedefs

using AmtrakStationCode = AlphaId< uint16_t, 3 >
 
using CountryId = AlphaId< uint16_t, 2 >
 
using IataCode = AlphaId< uint16_t, 3 >
 
typedef QFlags< PowerPlugTypePowerPlugTypes
 
using UKRailwayStationCode = AlphaId< uint16_t, 3 >
 
using ViaRailStationCode = AlphaId< UnalignedNumber< 3 >, 4 >
 

Enumerations

enum  DrivingSide : uint8_t { Unknown, Left, Right }
 
enum  PowerPlugType : uint16_t {
  Unknown = 0, Unknown, TypeA = 1 << 0, TypeB = 1 << 1,
  TypeC = 1 << 2, TypeD = 1 << 3, TypeE = 1 << 4, TypeF = 1 << 5,
  TypeG = 1 << 6, TypeH = 1 << 7, TypeI = 1 << 8, TypeJ = 1 << 9,
  TypeK = 1 << 10, TypeL = 1 << 11, TypeM = 1 << 12, TypeN = 1 << 13
}
 

Functions

Coordinate coordinateForAirport (IataCode iataCode)
 
KnowledgeDb::CountryId countryForAirport (IataCode iataCode)
 
Country countryForId (CountryId id)
 
CountryId countryIdForUicCode (uint16_t uicCountryCode)
 
std::vector< IataCodeiataCodesFromName (QStringView 1)
 
PowerPlugTypes incompatiblePowerPlugs (PowerPlugTypes plugs, PowerPlugTypes sockets)
 
PowerPlugTypes incompatiblePowerSockets (PowerPlugTypes plugs, PowerPlugTypes sockets)
 
TrainStation stationForAmtrakStationCode (AmtrakStationCode code)
 
TrainStation stationForBenerailId (BenerailStationId id)
 
TrainStation stationForIataCode (IataCode iataCode)
 
TrainStation stationForIbnr (IBNR ibnr)
 
TrainStation stationForIndianRailwaysStationCode (const QString &code)
 
TrainStation stationForSncfStationId (SncfStationId sncfId)
 
TrainStation stationForUic (UICStation uic)
 
TrainStation stationForUkRailwayStationCode (UKRailwayStationCode code)
 
TrainStation stationForViaRailStationCode (ViaRailStationCode code)
 
TrainStation stationForVRStationCode (VRStationCode vrStation)
 
QTimeZone timezoneForAirport (IataCode iataCode)
 

Detailed Description

Lookup functions, utilities and data types for the static knowledge database.

The content accessible by this functions is extracted from Wikidata and compiled into this library.

Note
The types in this namespace match the binary storage structure and thus are not intended for use in binary compatible APIs.

Typedef Documentation

◆ AmtrakStationCode

Amtrak staion codes.

Definition at line 126 of file stationidentifier.h.

◆ CountryId

using KItinerary::KnowledgeDb::CountryId = typedef AlphaId<uint16_t, 2>

ISO 3166-1 alpha 2 country identifier.

Definition at line 22 of file countrydb.h.

◆ IataCode

using KItinerary::KnowledgeDb::IataCode = typedef AlphaId<uint16_t, 3>

IATA airport code.

Definition at line 17 of file iatacode.h.

◆ UKRailwayStationCode

UK railway station code.

Definition at line 130 of file stationidentifier.h.

◆ ViaRailStationCode

Via Rail station code.

Definition at line 128 of file stationidentifier.h.

Enumeration Type Documentation

◆ DrivingSide

enum KItinerary::KnowledgeDb::DrivingSide : uint8_t
strong

Driving side.

Definition at line 25 of file countrydb.h.

◆ PowerPlugType

Power plug types.

Note
This cannot be an enum class due to QTBUG-47652.
Enumerator
TypeA 

US two-pin plugs.

TypeB 

US three-pin plugs.

TypeC 

Europlug.

TypeD 

Type D.

TypeE 

French plug.

TypeF 

Schuko plug.

TypeG 

UK plug.

TypeH 

Israel plug.

TypeI 

Australian plug.

TypeJ 

Swiss plug.

TypeK 

Danish plug.

TypeL 

Type L.

TypeM 

Type M.

TypeN 

Type N (Brasilian)

Definition at line 35 of file countrydb.h.

Function Documentation

◆ coordinateForAirport()

Coordinate KItinerary::KnowledgeDb::coordinateForAirport ( IataCode  iataCode)

Returns the geographical coordinates the airport with IATA code iataCode is in.

Definition at line 30 of file airportdb.cpp.

◆ countryForAirport()

CountryId KItinerary::KnowledgeDb::countryForAirport ( IataCode  iataCode)

Returns the country the airport with IATA code iataCode is in.

Definition at line 50 of file airportdb.cpp.

◆ countryForId()

Country KItinerary::KnowledgeDb::countryForId ( CountryId  id)

Look up country information by id.

Definition at line 21 of file countrydb.cpp.

◆ countryIdForUicCode()

KnowledgeDb::CountryId KItinerary::KnowledgeDb::countryIdForUicCode ( uint16_t  uicCountryCode)

Look up country ISO code from a UIC country code.

Definition at line 82 of file countrydb.cpp.

◆ iataCodesFromName()

std::vector< KnowledgeDb::IataCode > KItinerary::KnowledgeDb::iataCodesFromName ( QStringView  1)

Returns all possible IATA code candidates for the given airport name.

Definition at line 208 of file airportdb.cpp.

◆ incompatiblePowerPlugs()

PowerPlugTypes KItinerary::KnowledgeDb::incompatiblePowerPlugs ( PowerPlugTypes  plugs,
PowerPlugTypes  sockets 
)

Returns the power plugs out of plugs that won't fit into sockets.

Definition at line 54 of file countrydb.cpp.

◆ incompatiblePowerSockets()

PowerPlugTypes KItinerary::KnowledgeDb::incompatiblePowerSockets ( PowerPlugTypes  plugs,
PowerPlugTypes  sockets 
)

Returns the power sockets out pf sockets that are unable to receive plugs out of plugs, excluding those in plugs.

Definition at line 68 of file countrydb.cpp.

◆ stationForAmtrakStationCode()

TrainStation KItinerary::KnowledgeDb::stationForAmtrakStationCode ( AmtrakStationCode  code)

Lookup train station data by Amtrak station code.

Definition at line 81 of file trainstationdb.cpp.

◆ stationForBenerailId()

TrainStation KItinerary::KnowledgeDb::stationForBenerailId ( BenerailStationId  id)

Lookup train station data by Benerail station identifier.

Definition at line 71 of file trainstationdb.cpp.

◆ stationForIataCode()

TrainStation KItinerary::KnowledgeDb::stationForIataCode ( IataCode  iataCode)

Lookup train station data by IATA location code.

Definition at line 76 of file trainstationdb.cpp.

◆ stationForIbnr()

TrainStation KItinerary::KnowledgeDb::stationForIbnr ( IBNR  ibnr)

Lookup train station data by IBNR.

Definition at line 38 of file trainstationdb.cpp.

◆ stationForIndianRailwaysStationCode()

TrainStation KItinerary::KnowledgeDb::stationForIndianRailwaysStationCode ( const QString code)

Lookup train station data by Indian Railways station code.

Definition at line 53 of file trainstationdb.cpp.

◆ stationForSncfStationId()

TrainStation KItinerary::KnowledgeDb::stationForSncfStationId ( SncfStationId  sncfId)

Lookup train station data by SNCF station id.

Definition at line 48 of file trainstationdb.cpp.

◆ stationForUic()

TrainStation KItinerary::KnowledgeDb::stationForUic ( UICStation  uic)

Lookup train station data by UIC station id.

Definition at line 43 of file trainstationdb.cpp.

◆ stationForUkRailwayStationCode()

TrainStation KItinerary::KnowledgeDb::stationForUkRailwayStationCode ( UKRailwayStationCode  code)

Lookup train station data by UK railway station code.

Definition at line 91 of file trainstationdb.cpp.

◆ stationForViaRailStationCode()

TrainStation KItinerary::KnowledgeDb::stationForViaRailStationCode ( ViaRailStationCode  code)

Lookup train station data by Via Rail station code.

Definition at line 86 of file trainstationdb.cpp.

◆ stationForVRStationCode()

TrainStation KItinerary::KnowledgeDb::stationForVRStationCode ( VRStationCode  vrStation)

Lookup train station data by VR (Finland) station code.

Definition at line 66 of file trainstationdb.cpp.

◆ timezoneForAirport()

QTimeZone KItinerary::KnowledgeDb::timezoneForAirport ( IataCode  iataCode)

Returns the timezone the airport with IATA code iataCode is in.

Definition at line 40 of file airportdb.cpp.

This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Tue Jun 28 2022 04:02:13 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.