8#include "linecompare_p.h"
10#include <knowledgedb/linemetadata.h>
12#include <KPublicTransport/Location>
21bool LineUtil::isSameLineNameStrict(
const QString &lhs,
const QString &rhs)
23 return Internal::isSameLineName(lhs, rhs, Internal::StrictCompare);
26bool LineUtil::isSameLineNameFuzzy(
const QString &lhs,
const QString &rhs)
28 return Internal::isSameLineName(lhs, rhs, Internal::FuzzyCompare);
31bool LineUtil::isHighlyIdentifyingName(
QStringView s)
34 && std::any_of(s.
begin(), s.
end(), [](
QChar c) { return c.isDigit(); })
35 && std::any_of(s.
begin(), s.
end(), [](
QChar c) { return c.isLetter(); });
40 if (lhs == rhs || lhs == Line::Unknown || rhs == Line::Unknown) {
44 if (lhs == Line::Train) {
45 return rhs == Line::LocalTrain || rhs == Line::LongDistanceTrain || rhs == Line::RapidTransit;
47 if (rhs == Line::Train) {
48 return lhs == Line::LocalTrain || lhs == Line::LongDistanceTrain || lhs == Line::RapidTransit;
56 if ((lhs == Line::RapidTransit || lhs == Line::Metro || lhs == Line::Tramway)
57 && (rhs == Line::RapidTransit || rhs == Line::Metro || rhs == Line::Tramway)) {
61 return isCompatibleMode(lhs, rhs);
Mode
Mode of transportation.
Query operations and data types for accessing realtime public transport information from online servi...
const_iterator begin() const const
const_iterator end() const const
qsizetype size() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:59:57 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.