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 "KmlCreateTagHandler.h"
13
#include "KmlElementDictionary.h"
14
#include "GeoDataUpdate.h"
15
#include "GeoDataCreate.h"
16
#include "GeoDataParser.h"
17
#include "KmlObjectTagHandler.h"
23
KML_DEFINE_TAG_HANDLER( Create )
25
GeoNode* KmlCreateTagHandler::parse( GeoParser& parser ) const
27
Q_ASSERT( parser.isStartElement() && parser.isValidElement( kmlTag_Create ) );
29
GeoDataCreate *create = new GeoDataCreate;
30
KmlObjectTagHandler::parseIdentifiers( parser, create );
31
GeoStackItem parentItem = parser.parentElement();
33
if ( parentItem.represents( kmlTag_Update ) ) {
34
parentItem.nodeAs<GeoDataUpdate>()->setCreate( create );