6#include "GeoDataSchemaData.h"
14#include "GeoDataSimpleData.h"
15#include "GeoDataTypes.h"
20class GeoDataSchemaDataPrivate
23 GeoDataSchemaDataPrivate()
31 GeoDataExtendedData *m_parent;
34GeoDataSchemaData::GeoDataSchemaData()
35 : d(new GeoDataSchemaDataPrivate)
39GeoDataSchemaData::GeoDataSchemaData(
const GeoDataSchemaData &other)
40 : d(new GeoDataSchemaDataPrivate(*other.d))
44GeoDataSchemaData &GeoDataSchemaData::operator=(
const GeoDataSchemaData &rhs)
50bool GeoDataSchemaData::operator==(
const GeoDataSchemaData &other)
const
52 if (d->m_schemaUrl != other.d->m_schemaUrl || d->m_simpleData.size() != other.d->m_simpleData.size()) {
61 if (*begin != *beginOther) {
69bool GeoDataSchemaData::operator!=(
const GeoDataSchemaData &other)
const
74GeoDataSchemaData::~GeoDataSchemaData()
79QString GeoDataSchemaData::schemaUrl()
const
81 return d->m_schemaUrl;
84void GeoDataSchemaData::setSchemaUrl(
const QString &schemaUrl)
86 d->m_schemaUrl = schemaUrl;
89GeoDataSimpleData &GeoDataSchemaData::simpleData(
const QString &name)
const
91 return d->m_simpleData[
name];
94void GeoDataSchemaData::addSimpleData(
const GeoDataSimpleData &data)
96 d->m_simpleData.
insert(data.name(), data);
101 return d->m_simpleData.values();
104void GeoDataSchemaData::setParent(GeoDataExtendedData *parent)
106 d->m_parent = parent;
109const GeoDataExtendedData *GeoDataSchemaData::parent()
const
114GeoDataExtendedData *GeoDataSchemaData::parent()
119const char *GeoDataSchemaData::nodeType()
const
121 return GeoDataTypes::GeoDataSchemaDataType;
124void GeoDataSchemaData::pack(
QDataStream &stream)
const
126 stream << d->m_schemaUrl;
127 stream << d->m_simpleData.size();
132 for (; iter !=
end; ++iter) {
133 iter.value().pack(stream);
139 stream >> d->m_schemaUrl;
143 for (
int i = 0; i < size; i++) {
144 GeoDataSimpleData simpleData;
145 simpleData.unpack(stream);
146 d->m_simpleData.insert(simpleData.name(), simpleData);
QString name(StandardAction id)
const QList< QKeySequence > & begin()
const QList< QKeySequence > & end()
bool operator==(const StyleDelim &l, const StyleDelim &r)
Binds a QML item to a specific geodetic location in screen coordinates.
QString & insert(qsizetype position, QChar ch)