KPublicTransport

equipmentutil.cpp
1 /*
2  SPDX-FileCopyrightText: 2020 Volker Krause <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #include "equipmentutil.h"
8 #include "notesutil_p.h"
9 
10 #include <KPublicTransport/Equipment>
11 
12 using namespace KPublicTransport;
13 
14 Equipment EquipmentUtil::merge(const Equipment &lhs, const Equipment &rhs)
15 {
16  auto e = lhs;
17  e.setDisruptionEffect(std::max(lhs.disruptionEffect(), rhs.disruptionEffect()));
18  e.setNotes(NotesUtil::mergeNotes(lhs.notes(), rhs.notes()));
19  e.setType(std::max(lhs.type(), rhs.type()));
20  return e;
21 }
Status information about equipment such as elevators or escalators.
Definition: equipment.h:24
Query operations and data types for accessing realtime public transport information from online servi...
Definition: attribution.cpp:16
QStringList notes
General human-readable notes on this service, e.g.
Definition: equipment.h:40
KPublicTransport::Disruption::Effect disruptionEffect
Disruption effect on this section, if any.
Definition: equipment.h:38
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sat Oct 23 2021 23:05:21 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.