File indexing completed on 2024-05-12 04:42:42
0001 /* 0002 SPDX-FileCopyrightText: 2019 Volker Krause <vkrause@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #ifndef KPUBLICTRANSPORT_ATTRIBUTIONUTIL_P_H 0008 #define KPUBLICTRANSPORT_ATTRIBUTIONUTIL_P_H 0009 0010 #include <vector> 0011 0012 namespace KPublicTransport { 0013 0014 class Attribution; 0015 0016 /** Functions to merge Attribution information. */ 0017 namespace AttributionUtil 0018 { 0019 /** Sorts @p attrs in the order expected by merge. */ 0020 void sort(std::vector<Attribution> &attrs); 0021 0022 /** @p left is assumed to be sorted already. */ 0023 void merge(std::vector<Attribution> &left, std::vector<Attribution> &&right); 0024 void merge(std::vector<Attribution> &left, const std::vector<Attribution> &right); 0025 void merge(std::vector<Attribution> &left, const Attribution &right); 0026 void merge(Attribution &left, const Attribution &right); 0027 } 0028 0029 } 0030 0031 #endif // KPUBLICTRANSPORT_ATTRIBUTIONUTIL_P_H