~ubuntu-branches/ubuntu/wily/marble/wily-proposed

« back to all changes in this revision

Viewing changes to src/lib/marble/geodata/data/GeoDataSchema.h

  • Committer: Package Import Robot
  • Author(s): Scarlett Clark, Jonathan Riddell, Scarlett Clark
  • Date: 2014-07-24 23:38:32 UTC
  • mfrom: (1.5.2)
  • Revision ID: package-import@ubuntu.com-20140724233832-7v4421t4khrhw487
Tags: 4:4.13.90-0ubuntu1
[ Jonathan Riddell ]
* Switch to libmarblewidget19 for new soversion

[ Scarlett Clark ]
* New upstream beta release
* Update: do_not_install_private_headers. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//
 
2
// This file is part of the Marble Virtual Globe.
 
3
//
 
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
 
6
// the source code.
 
7
//
 
8
// Copyright 2014 Abhinav Gangwar <abhgang@gmail.com>
 
9
//
 
10
 
 
11
#ifndef MARBLE_GEODATASCHEMA_H
 
12
#define MARBLE_GEODATASCHEMA_H
 
13
 
 
14
// Qt
 
15
#include <QHash>
 
16
#include <QList>
 
17
 
 
18
// Marble
 
19
#include "GeoDataObject.h"
 
20
#include "GeoDataSimpleField.h"
 
21
#include "geodata_export.h"
 
22
 
 
23
class QDataStream;
 
24
 
 
25
namespace Marble
 
26
{
 
27
 
 
28
class GeoDataSchemaPrivate;
 
29
 
 
30
class GEODATA_EXPORT GeoDataSchema : public GeoDataObject
 
31
{
 
32
public:
 
33
    GeoDataSchema();
 
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;
 
39
    ~GeoDataSchema();
 
40
 
 
41
    /*
 
42
     * @brief Returns the name attribute of schema
 
43
     */
 
44
    QString schemaName() const;
 
45
 
 
46
    /*
 
47
     * @brief Sets the name attribute of the schema
 
48
     * @param name  The name to be set
 
49
     */
 
50
    void setSchemaName( const QString& name );
 
51
 
 
52
    /*
 
53
     * @brief Returns the SimpleField child of schema
 
54
     * @param name  The value of name attribute of SimpleField which is to be returned
 
55
     */
 
56
    GeoDataSimpleField& simpleField( const QString &name ) const;
 
57
 
 
58
    /*
 
59
     * @brief Adds a SimpleField to schema
 
60
     * @param value  The SimpleField to be added
 
61
     */
 
62
    void addSimpleField( const GeoDataSimpleField& value );
 
63
 
 
64
    /*
 
65
     * @brief dump a vector containing all simple fields of schema
 
66
     */
 
67
    QList<GeoDataSimpleField> simpleFields() const;
 
68
 
 
69
    virtual const char* nodeType() const;
 
70
 
 
71
    virtual void pack( QDataStream& stream ) const;
 
72
 
 
73
    virtual void unpack( QDataStream& stream );
 
74
 
 
75
private:
 
76
    GeoDataSchemaPrivate * const d;
 
77
 
 
78
};
 
79
 
 
80
}
 
81
 
 
82
#endif  // MARBLE_GEODATASCHEMA_H