File indexing completed on 2024-05-19 03:51:49

0001 /*
0002     SPDX-FileCopyrightText: 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #ifndef MARBLE_GEODATAPARSER_H
0008 #define MARBLE_GEODATAPARSER_H
0009 
0010 #include "geodata_export.h"
0011 #include "GeoParser.h"
0012 
0013 namespace Marble
0014 {
0015 
0016 class GeoDocument;
0017 class GeoDataDocument;
0018 
0019 enum GeoDataSourceType {
0020     GeoData_UNKNOWN = -1,
0021     GeoData_KML    = 1,
0022     GeoData_GeoRSS = 2
0023 };
0024 
0025 class GEODATA_EXPORT GeoDataParser : public GeoParser
0026 {
0027 public:
0028     explicit GeoDataParser(GeoDataSourceType source);
0029     ~GeoDataParser() override;
0030 
0031 private:
0032     bool isValidElement(const QString& tagName) const override;
0033     bool isValidRootElement() override;
0034 
0035     GeoDocument* createDocument() const override;
0036 };
0037 
0038 // Global helper function for the tag handlers
0039 GEODATA_EXPORT GeoDataDocument* geoDataDoc(GeoParser& parser);
0040 
0041 }
0042 
0043 #endif