KOSMIndoorMap

xmlparser.h
1/*
2 SPDX-FileCopyrightText: 2020 Volker Krause <vkrause@kde.org>
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 "abstractreader.h"
11
12#include <QString>
13
14class QIODevice;
16
17namespace OSM {
18
19class DataSet;
20
21class XmlParser : public AbstractReader
22{
23public:
24 explicit XmlParser(DataSet *dataSet);
25
26protected: // for reuse by the OSC parser
27 [[nodiscard]] OSM::Node parseNode(QXmlStreamReader &reader) const;
28 [[nodiscard]] OSM::Way parseWay(QXmlStreamReader &reader) const;
29 [[nodiscard]] OSM::Relation parseRelation(QXmlStreamReader &reader) const;
30
31private:
32 void readFromIODevice(QIODevice *io) override;
33
34 template <typename T>
35 void parseTag(QXmlStreamReader &reader, T &elem) const;
36 template <typename T>
37 void parseTagOrBounds(QXmlStreamReader &reader, T&elem) const;
38 template <typename T>
39 void parseBounds(QXmlStreamReader &reader, T &elem) const;
40};
41
42}
43
44#endif // OSM_XMLPARSER_P_H
An OSM node.
Definition datatypes.h:204
An OSM relation.
Definition datatypes.h:316
An OSM way.
Definition datatypes.h:232
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-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:06:15 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.