Marble

KmlExtendedDataTagWriter.cpp
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2010 Gaurav Gupta <1989.gaurav@googlemail.com>
4//
5
6
7#include "KmlExtendedDataTagWriter.h"
8
9#include "GeoDataTypes.h"
10#include "GeoWriter.h"
11#include "KmlElementDictionary.h"
12#include "GeoDataExtendedData.h"
13#include "GeoDataData.h"
14#include "GeoDataSchemaData.h"
15
16#include <QHash>
17
18namespace Marble
19{
20
21static GeoTagWriterRegistrar s_writerExtendedData( GeoTagWriter::QualifiedName( GeoDataTypes::GeoDataExtendedDataType,
22 kml::kmlTag_nameSpaceOgc22 ),
23 new KmlExtendedDataTagWriter() );
24
25
26bool KmlExtendedDataTagWriter::write( const GeoNode *node,
27 GeoWriter& writer ) const
28{
29 const GeoDataExtendedData *extended = static_cast<const GeoDataExtendedData*>( node );
30
31 writer.writeStartElement( kml::kmlTag_ExtendedData );
32
35
36 for( QHash< QString, GeoDataData >::const_iterator i = begin; i != end; ++i ){
37 writeElement( &i.value(), writer );
38 }
39
40 for( const GeoDataSchemaData &schemaData: extended->schemaDataList() ) {
41 writeElement( &schemaData, writer );
42 }
43
44 writer.writeEndElement();
45
46 return true;
47}
48
49}
QPair< QString, QString > QualifiedName
Object Name and Namespace Pair This type is intended to be used in a similar way to.
const QList< QKeySequence > & begin()
const QList< QKeySequence > & end()
Binds a QML item to a specific geodetic location in screen coordinates.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jun 14 2024 11:54:17 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.