KOSMIndoorMap

xmlparser.h
1 /*
2  SPDX-FileCopyrightText: 2020 Volker Krause <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #ifndef OSM_XMLPARSER_H
8 #define OSM_XMLPARSER_H
9 
10 #include <kosm_export.h>
11 
12 #include <QString>
13 
14 class QIODevice;
15 class QXmlStreamReader;
16 
17 namespace OSM {
18 
19 class DataSet;
20 
21 class KOSM_EXPORT XmlParser
22 {
23 public:
24  explicit XmlParser(DataSet *dataSet);
25 
26  void parse(QIODevice *io);
27  QString error() const;
28 
29 private:
30  void parseNode(QXmlStreamReader &reader);
31  void parseWay(QXmlStreamReader &reader);
32  void parseRelation(QXmlStreamReader &reader);
33  template <typename T>
34  void parseTag(QXmlStreamReader &reader, T &elem);
35  template <typename T>
36  void parseTagOrBounds(QXmlStreamReader &reader, T&elem);
37  template <typename T>
38  void parseBounds(QXmlStreamReader &reader, T &elem);
39 
40  DataSet *m_dataSet;
41  QString m_error;
42 };
43 
44 }
45 
46 #endif // OSM_XMLPARSER_P_H
KHEALTHCERTIFICATE_EXPORT QVariant parse(const QByteArray &data)
void error(QWidget *parent, const QString &text, const QString &caption=QString(), Options options=Notify)
Low-level types and functions to work with raw OSM data as efficiently as possible.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sat Oct 23 2021 23:03:46 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.