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 Abhinav Gangwar <abhgang@gmail.com>
11
#ifndef MARBLE_GEODATASCHEMA_H
12
#define MARBLE_GEODATASCHEMA_H
19
#include "GeoDataObject.h"
20
#include "GeoDataSimpleField.h"
21
#include "geodata_export.h"
28
class GeoDataSchemaPrivate;
30
class GEODATA_EXPORT GeoDataSchema : public GeoDataObject
34
GeoDataSchema( const QHash<QString, GeoDataSimpleField>& simpleFields );
35
GeoDataSchema( const GeoDataSchema& other );
36
GeoDataSchema& operator=( const GeoDataSchema& other );
37
bool operator==( const GeoDataSchema& other ) const;
38
bool operator!=( const GeoDataSchema& other ) const;
42
* @brief Returns the name attribute of schema
44
QString schemaName() const;
47
* @brief Sets the name attribute of the schema
48
* @param name The name to be set
50
void setSchemaName( const QString& name );
53
* @brief Returns the SimpleField child of schema
54
* @param name The value of name attribute of SimpleField which is to be returned
56
GeoDataSimpleField& simpleField( const QString &name ) const;
59
* @brief Adds a SimpleField to schema
60
* @param value The SimpleField to be added
62
void addSimpleField( const GeoDataSimpleField& value );
65
* @brief dump a vector containing all simple fields of schema
67
QList<GeoDataSimpleField> simpleFields() const;
69
virtual const char* nodeType() const;
71
virtual void pack( QDataStream& stream ) const;
73
virtual void unpack( QDataStream& stream );
76
GeoDataSchemaPrivate * const d;
82
#endif // MARBLE_GEODATASCHEMA_H