Marble

KmlMultiGeometryTagWriter.cpp
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2010 Dennis Nienhüser <nienhueser@kde.org>
4//
5
6#include "KmlMultiGeometryTagWriter.h"
7
8#include "GeoDataMultiGeometry.h"
9#include "GeoDataTypes.h"
10#include "GeoWriter.h"
11#include "KmlElementDictionary.h"
12#include "KmlObjectTagWriter.h"
13
14namespace Marble
15{
16
17static GeoTagWriterRegistrar s_writerMultiGeometry(
18 GeoTagWriter::QualifiedName( GeoDataTypes::GeoDataMultiGeometryType,
19 kml::kmlTag_nameSpaceOgc22 ),
20 new KmlMultiGeometryTagWriter );
21
22bool KmlMultiGeometryTagWriter::write( const GeoNode *node, GeoWriter& writer ) const
23{
24 const GeoDataMultiGeometry *geometry = static_cast<const GeoDataMultiGeometry*>( node );
25
26 writer.writeStartElement( kml::kmlTag_MultiGeometry );
27 KmlObjectTagWriter::writeIdentifiers( writer, geometry );
28
29 for ( int i = 0; i < geometry->size(); ++i )
30 {
31 writeElement( &geometry->at( i ), writer );
32 }
33
34 writer.writeEndElement();
35
36 return true;
37}
38
39}
QPair< QString, QString > QualifiedName
Object Name and Namespace Pair This type is intended to be used in a similar way to.
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 21 2024 12:00:07 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.