2
// This file is part of the Marble Virtual Globe.
4
// This program is free software licensed under the GNU LGPL. You can
5
// find a copy of this license in LICENSE.txt in the top directory of
8
// Copyright 2014 Sanjiban Bairagya <sanjiban22393@gmail.com>
11
#include "KmlChangeTagHandler.h"
13
#include "KmlElementDictionary.h"
14
#include "GeoDataUpdate.h"
15
#include "GeoDataChange.h"
16
#include "GeoDataParser.h"
17
#include "KmlObjectTagHandler.h"
23
KML_DEFINE_TAG_HANDLER( Change )
25
GeoNode* KmlChangeTagHandler::parse( GeoParser& parser ) const
27
Q_ASSERT( parser.isStartElement() && parser.isValidElement( kmlTag_Change ) );
29
GeoDataChange *change = new GeoDataChange;
30
KmlObjectTagHandler::parseIdentifiers( parser, change );
31
GeoStackItem parentItem = parser.parentElement();
33
if ( parentItem.represents( kmlTag_Update ) ) {
34
parentItem.nodeAs<GeoDataUpdate>()->setChange( change );