KPublicTransport::UicStationCode Namespace Reference


QStringView country (QStringView id)
QString identifierType ()
bool isValid (QStringView id, const std::vector< uint8_t > &allowedCountryCodes={})

Detailed Description

Utility functions for dealing with UIC station codes.

Also works for the syntactically identical IBNR station codes.

Function Documentation

◆ country()

QStringView KPublicTransport::UicStationCode::country ( QStringView id)

Returns the country code of a given valid UIC station code.

Definition at line 37 of file uicstationcode.cpp.

◆ identifierType()

QString KPublicTransport::UicStationCode::identifierType ( )

The identifier type for use in Location::identifer for UIC station ids.

Definition at line 42 of file uicstationcode.cpp.

◆ isValid()

bool KPublicTransport::UicStationCode::isValid ( QStringView id,
const std::vector< uint8_t > & allowedCountryCodes = {} )

Returns true if id is a valid UIC station code.

@params allowedCountryCodes if non-empty, only UIC station codes with an UIC country code included in that list are considered valid. This list has to be sorted.

Definition at line 15 of file uicstationcode.cpp.

This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jul 19 2024 11:50:59 by doxygen 1.11.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.