diff --git a/src/libs/3rdparty/modeling/qtserialization/inc/qark/access.h b/src/libs/3rdparty/modeling/qtserialization/inc/qark/access.h index 184a9b05bad..88f96121a73 100644 --- a/src/libs/3rdparty/modeling/qtserialization/inc/qark/access.h +++ b/src/libs/3rdparty/modeling/qtserialization/inc/qark/access.h @@ -55,12 +55,24 @@ void save(Archive &archive, const T &t) Access::save(archive, t); } +template +void save(Archive &archive, const T &t, const Parameters &) +{ + save(archive, t); +} + template void load(Archive &archive, T &t) { Access::load(archive, t); } +template +void load(Archive &archive, T &t, const Parameters &) +{ + load(archive, t); +} + template void serialize(Archive &archive, T &t) { @@ -92,30 +104,9 @@ void serialize_helper(Archive &archive, T &t) static inline void serialize(Archive &archive, TYPE &); \ }; -#if 0 -#define QARK_ACCESS_SPECIALIZE_LOAD_SAVE(INARCHIVE, OUTARCHIVE, TYPE) \ - template<> class Access { public: static inline void load(INARCHIVE &archive, TYPE &); void serialize(INARCHIVE &, TYPE &); }; \ - template<> class Access { public: static inline void save(OUTARCHIVE &archive, const TYPE &); void serialize(OUTARCHIVE &, TYPE &); }; \ - void Access::serialize(INARCHIVE &, TYPE &) { } \ - void Access::serialize(OUTARCHIVE &, TYPE &) { } \ - template class Access; \ - template class Access; -#endif - #define QARK_ACCESS_SPECIALIZE(INARCHIVE, OUTARCHIVE, TYPE) \ template class Access; \ template class Access; -#if 0 -#define QARK_SPECIALIZE_SERIALIZE(INARCHIVE, OUTARCHIVE, TYPE) \ - QARK_ACCESS_SPECIALIZE(INARCHIVE, OUTARCHIVE, TYPE); \ - template void serialize(INARCHIVE &, TYPE &); \ - template void serialize(OUTARCHIVE &, TYPE &); - -#define QARK_SPECIALIZE_LOAD_SAVE(INARCHIVE, OUTARCHIVE, TYPE) \ - template void load(INARCHIVE &, TYPE &); \ - template void save(OUTARCHIVE &, const TYPE &); -#endif - #endif // QARK_ACCESS_H diff --git a/src/libs/3rdparty/modeling/qtserialization/inc/qark/archivebasics.h b/src/libs/3rdparty/modeling/qtserialization/inc/qark/archivebasics.h index 06e9df67fe6..ffe68e7639f 100644 --- a/src/libs/3rdparty/modeling/qtserialization/inc/qark/archivebasics.h +++ b/src/libs/3rdparty/modeling/qtserialization/inc/qark/archivebasics.h @@ -33,6 +33,10 @@ #include "flag.h" +#include +#include +#include + namespace qark { class ArchiveBasics @@ -48,8 +52,40 @@ public: bool takeFlag(const Flag &flag) { bool f = (_flags & flag.getMask()) != 0; _flags &= ~flag.getMask(); return f; } + bool hasUserData(const QString &key) + { + return _user_data.contains(key); + } + + template + T getUserData(const QString &key) + { + return _user_data.value(key).value(); + } + + template + T getUserData(const QString &key, const T &default_value) + { + // gcc 4.8.2 fails to compile if the following 2 statements are written in one expression + //return _user_data.value(key, data).value(); + QVariant v = _user_data.value(key, default_value); + return v.value(); + } + + template + void setUserData(const QString &key, const T &data) + { + _user_data.insert(key, data); + } + + void removeUserData(const QString &key) + { + _user_data.remove(key); + } + private: Flag::mask_type _flags; + QHash _user_data; }; } diff --git a/src/libs/3rdparty/modeling/qtserialization/inc/qark/attribute.h b/src/libs/3rdparty/modeling/qtserialization/inc/qark/attribute.h index 96c1476b630..6f548759af4 100644 --- a/src/libs/3rdparty/modeling/qtserialization/inc/qark/attribute.h +++ b/src/libs/3rdparty/modeling/qtserialization/inc/qark/attribute.h @@ -31,6 +31,8 @@ #ifndef QARK_ATTRIBUTE_H #define QARK_ATTRIBUTE_H +#include "parameters.h" + #include namespace qark { @@ -38,19 +40,29 @@ namespace qark { template class Attr { public: - explicit Attr(const QString &qualified_name, T *value) + Attr(const QString &qualified_name, T *value) : _qualified_name(qualified_name), _value(value) { } + Attr(const QString &qualified_name, T *value, const Parameters ¶meters) + : _qualified_name(qualified_name), + _value(value), + _parameters(parameters) + { + } + const QString &getQualifiedName() const { return _qualified_name; } T *getValue() const { return _value; } + Parameters getParameters() const { return _parameters; } + private: QString _qualified_name; T *_value; + Parameters _parameters; }; template @@ -59,33 +71,56 @@ Attr attr(const QString &qualified_name, T * const &value) return Attr(qualified_name, &value); } +template +Attr attr(const QString &qualified_name, T * const &value, const Parameters ¶meters) +{ + return Attr(qualified_name, &value, parameters); +} + template Attr attr(const QString &qualified_name, T &value) { return Attr(qualified_name, &value); } +template +Attr attr(const QString &qualified_name, T &value, const Parameters ¶meters) +{ + return Attr(qualified_name, &value, parameters); +} + template class GetterAttr { public: - explicit GetterAttr(const QString &qualified_name, const U &u, T (U::*getter)() const) + GetterAttr(const QString &qualified_name, const U &u, T (U::*getter)() const) : _qualified_name(qualified_name), _u(u), _getter(getter) { } + GetterAttr(const QString &qualified_name, const U &u, T (U::*getter)() const, const Parameters ¶meters) + : _qualified_name(qualified_name), + _u(u), + _getter(getter), + _parameters(parameters) + { + } + const QString &getQualifiedName() const { return _qualified_name; } const U &getObject() const { return _u; } T (U::*getGetter() const)() const { return _getter; } + Parameters getParameters() const { return _parameters; } + private: QString _qualified_name; const U &_u; T (U::*_getter)() const; + Parameters _parameters; }; template @@ -94,27 +129,44 @@ GetterAttr attr(const QString &qualified_name, const U &u, T (U::*getter)( return GetterAttr(qualified_name, u, getter); } +template +GetterAttr attr(const QString &qualified_name, const U &u, T (U::*getter)() const, const Parameters ¶meters) +{ + return GetterAttr(qualified_name, u, getter, parameters); +} + template class SetterAttr { public: - explicit SetterAttr(const QString &qualified_name, U &u, void (U::*setter)(T)) + SetterAttr(const QString &qualified_name, U &u, void (U::*setter)(T)) : _qualified_name(qualified_name), _u(u), _setter(setter) { } + SetterAttr(const QString &qualified_name, U &u, void (U::*setter)(T), const Parameters ¶meters) + : _qualified_name(qualified_name), + _u(u), + _setter(setter), + _parameters(parameters) + { + } + const QString &getQualifiedName() const { return _qualified_name; } U &getObject() const { return _u; } void (U::*getSetter() const)(T) { return _setter; } + Parameters getParameters() const { return _parameters; } + private: QString _qualified_name; U &_u; void (U::*_setter)(T); + Parameters _parameters; }; template @@ -123,11 +175,17 @@ SetterAttr attr(const QString &qualified_name, U &u, void (U::*setter)(T)) return SetterAttr(qualified_name, u, setter); } +template +SetterAttr attr(const QString &qualified_name, U &u, void (U::*setter)(T), const Parameters ¶meters) +{ + return SetterAttr(qualified_name, u, setter, parameters); +} + template class GetterSetterAttr { public: - explicit GetterSetterAttr(const QString &qualified_name, U &u, T (U::*getter)() const, void (U::*setter)(V)) + GetterSetterAttr(const QString &qualified_name, U &u, T (U::*getter)() const, void (U::*setter)(V)) : _qualified_name(qualified_name), _u(u), _getter(getter), @@ -135,6 +193,15 @@ public: { } + GetterSetterAttr(const QString &qualified_name, U &u, T (U::*getter)() const, void (U::*setter)(V), const Parameters ¶meters) + : _qualified_name(qualified_name), + _u(u), + _getter(getter), + _setter(setter), + _parameters(parameters) + { + } + const QString &getQualifiedName() const { return _qualified_name; } U &getObject() const { return _u; } @@ -143,11 +210,14 @@ public: void (U::*getSetter() const)(V) { return _setter; } + Parameters getParameters() const { return _parameters; } + private: QString _qualified_name; U &_u; T (U::*_getter)() const; void (U::*_setter)(V); + Parameters _parameters; }; template @@ -156,27 +226,44 @@ GetterSetterAttr attr(const QString &qualified_name, U &u, T (U::*gette return GetterSetterAttr(qualified_name, u, getter, setter); } +template +GetterSetterAttr attr(const QString &qualified_name, U &u, T (U::*getter)() const, void (U::*setter)(V), const Parameters ¶meters) +{ + return GetterSetterAttr(qualified_name, u, getter, setter, parameters); +} + template class GetFuncAttr { public: - explicit GetFuncAttr(const QString &qualified_name, U &u, T (*get_func)(const U &)) + GetFuncAttr(const QString &qualified_name, U &u, T (*get_func)(const U &)) : _qualified_name(qualified_name), _u(u), _get_func(get_func) { } + GetFuncAttr(const QString &qualified_name, U &u, T (*get_func)(const U &), const Parameters ¶meters) + : _qualified_name(qualified_name), + _u(u), + _get_func(get_func), + _parameters(parameters) + { + } + const QString &getQualifiedName() const { return _qualified_name; } U &getObject() const { return _u; } T (*getGetFunc() const)(const U &) { return _get_func; } + Parameters getParameters() const { return _parameters; } + private: QString _qualified_name; U &_u; T (*_get_func)(const U &); + Parameters _parameters; }; template @@ -185,27 +272,44 @@ GetFuncAttr attr(const QString &qualified_name, const U &u, T (*get_func)( return GetFuncAttr(qualified_name, u, get_func); } +template +GetFuncAttr attr(const QString &qualified_name, const U &u, T (*get_func)(const U &), const Parameters ¶meters) +{ + return GetFuncAttr(qualified_name, u, get_func, parameters); +} + template class SetFuncAttr { public: - explicit SetFuncAttr(const QString &qualified_name, U &u, void (*set_func)(U &, T)) + SetFuncAttr(const QString &qualified_name, U &u, void (*set_func)(U &, T)) : _qualified_name(qualified_name), _u(u), _set_func(set_func) { } + SetFuncAttr(const QString &qualified_name, U &u, void (*set_func)(U &, T), const Parameters ¶meters) + : _qualified_name(qualified_name), + _u(u), + _set_func(set_func), + _parameters(parameters) + { + } + const QString &getQualifiedName() const { return _qualified_name; } U &getObject() const { return _u; } void (*getSetFunc() const)(U &, T) { return _set_func; } + Parameters getParameters() const { return _parameters; } + private: QString _qualified_name; U &_u; void (*_set_func)(U &, T); + Parameters _parameters; }; template @@ -214,11 +318,17 @@ SetFuncAttr attr(const QString &qualified_name, U &u, void (*set_func)(U & return SetFuncAttr(qualified_name, u, set_func); } +template +SetFuncAttr attr(const QString &qualified_name, U &u, void (*set_func)(U &, T), const Parameters ¶meters) +{ + return SetFuncAttr(qualified_name, u, set_func, parameters); +} + template class GetSetFuncAttr { public: - explicit GetSetFuncAttr(const QString &qualified_name, U &u, T (*get_func)(const U &), void (*set_func)(U &, V)) + GetSetFuncAttr(const QString &qualified_name, U &u, T (*get_func)(const U &), void (*set_func)(U &, V)) : _qualified_name(qualified_name), _u(u), _get_func(get_func), @@ -226,6 +336,15 @@ public: { } + GetSetFuncAttr(const QString &qualified_name, U &u, T (*get_func)(const U &), void (*set_func)(U &, V), const Parameters ¶meters) + : _qualified_name(qualified_name), + _u(u), + _get_func(get_func), + _set_func(set_func), + _parameters(parameters) + { + } + const QString &getQualifiedName() const { return _qualified_name; } U &getObject() const { return _u; } @@ -234,11 +353,14 @@ public: void (*getSetFunc() const)(U &, V) { return _set_func; } + Parameters getParameters() const { return _parameters; } + private: QString _qualified_name; U &_u; T (*_get_func)(const U &); void (*_set_func)(U &, V); + Parameters _parameters; }; template @@ -247,6 +369,12 @@ GetSetFuncAttr attr(const QString &qualified_name, U &u, T (*get_func)( return GetSetFuncAttr(qualified_name, u, get_func, set_func); } +template +GetSetFuncAttr attr(const QString &qualified_name, U &u, T (*get_func)(const U &), void (*set_func)(U &, V), const Parameters ¶meters) +{ + return GetSetFuncAttr(qualified_name, u, get_func, set_func, parameters); +} + } #endif // QARK_ATTRIBUTE_H diff --git a/src/libs/3rdparty/modeling/qtserialization/inc/qark/baseclass.h b/src/libs/3rdparty/modeling/qtserialization/inc/qark/baseclass.h index df2ef27c242..418917199af 100644 --- a/src/libs/3rdparty/modeling/qtserialization/inc/qark/baseclass.h +++ b/src/libs/3rdparty/modeling/qtserialization/inc/qark/baseclass.h @@ -32,6 +32,7 @@ #define QARK_BASECLASS_H #include "typeregistry.h" +#include "parameters.h" #include @@ -41,21 +42,31 @@ namespace qark { template class Base { public: - explicit Base(const QString &qualified_name, DERIVED &obj) + Base(const QString &qualified_name, DERIVED &obj) : _qualified_name(qualified_name), _base(obj) { } + Base(const QString &qualified_name, DERIVED &obj, const Parameters ¶meters) + : _qualified_name(qualified_name), + _base(obj), + _parameters(parameters) + { + } + const QString &getQualifiedName() const { return _qualified_name; } const BASE &getBase() const { return _base; } BASE &getBase() { return _base; } + Parameters getParameters() const { return _parameters; } + private: QString _qualified_name; BASE &_base; + Parameters _parameters; }; template @@ -64,18 +75,36 @@ Base base(const QString &qualified_name, DERIVED &obj) return Base(qualified_name, obj); } +template +Base base(const QString &qualified_name, DERIVED &obj, const Parameters ¶meters) +{ + return Base(qualified_name, obj, parameters); +} + template Base base(const QString &qualified_name, DERIVED *&obj) { return Base(qualified_name, *obj); } +template +Base base(const QString &qualified_name, DERIVED *&obj, const Parameters ¶meters) +{ + return Base(qualified_name, *obj, parameters); +} + template Base base(DERIVED &obj) { return Base(QString(QStringLiteral("base-%1")).arg(get_type_uid()), obj); } +template +Base base(DERIVED &obj, const Parameters ¶meters) +{ + return Base(QString(QStringLiteral("base-%1")).arg(get_type_uid()), obj, parameters); +} + } #endif // QARK_BASECLASS_H diff --git a/src/libs/3rdparty/modeling/qtserialization/inc/qark/friend_access.h b/src/libs/3rdparty/modeling/qtserialization/inc/qark/friend_access.h index 9c9248e6354..39e29bf2cb8 100644 --- a/src/libs/3rdparty/modeling/qtserialization/inc/qark/friend_access.h +++ b/src/libs/3rdparty/modeling/qtserialization/inc/qark/friend_access.h @@ -28,8 +28,8 @@ ** ****************************************************************************/ -#ifndef QMT_FRIEND_ACCESS_H -#define QMT_FRIEND_ACCESS_H +#ifndef QARK_FRIEND_ACCESS_H +#define QARK_FRIEND_ACCESS_H #define QARK_FRIEND_ACCESS \ template \ diff --git a/src/libs/3rdparty/modeling/qtserialization/inc/qark/parameters.h b/src/libs/3rdparty/modeling/qtserialization/inc/qark/parameters.h new file mode 100644 index 00000000000..07df43463a8 --- /dev/null +++ b/src/libs/3rdparty/modeling/qtserialization/inc/qark/parameters.h @@ -0,0 +1,71 @@ +/*************************************************************************** +** +** Copyright (C) 2015 Jochen Becher +** Contact: http://www.qt.io/licensing +** +** This file is part of Qt Creator. +** +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms and +** conditions see http://www.qt.io/terms-conditions. For further information +** use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +****************************************************************************/ + +#ifndef QARK_PARAMETER_H +#define QARK_PARAMETER_H + +#include "flag.h" + +namespace qark { + +class Parameters +{ + +public: + + Parameters() + : _flags(0) + { + } + + Parameters(const Flag &flag) + : _flags(flag.getMask()) + { + } + +public: + + void setFlag(const Flag &flag) { _flags |= flag.getMask(); } + + void clearFlag(const Flag &flag) { _flags &= ~flag.getMask(); } + + bool hasFlag(const Flag &flag) const { return (_flags & flag.getMask()) != 0; } + + bool takeFlag(const Flag &flag) { bool f = (_flags & flag.getMask()) != 0; _flags &= ~flag.getMask(); return f; } + +private: + + Flag::mask_type _flags; +}; + +} + +#endif // QARK_PARAMETER_H + diff --git a/src/libs/3rdparty/modeling/qtserialization/inc/qark/qxmlinarchive.h b/src/libs/3rdparty/modeling/qtserialization/inc/qark/qxmlinarchive.h index 225377d7575..35e1b7d69b7 100644 --- a/src/libs/3rdparty/modeling/qtserialization/inc/qark/qxmlinarchive.h +++ b/src/libs/3rdparty/modeling/qtserialization/inc/qark/qxmlinarchive.h @@ -75,7 +75,7 @@ private: typedef QList children_type; public: - virtual ~Node() { } + virtual ~Node() { qDeleteAll(_children); } const children_type &getChildren() const { return _children; } @@ -83,8 +83,6 @@ private: virtual void accept(QXmlInArchive &visitor, const XmlTag &tag) { visitor.visit(this, tag); } - virtual void acceptForwardRef(QXmlInArchive &visitor, const impl::ObjectId &id) { visitor.visitForwardRef(this, id); } - void append(Node *node) { _children.push_back(node); } private: @@ -237,8 +235,6 @@ private: void accept(QXmlInArchive &visitor, const XmlTag &tag) { visitor.visit(this, tag); } - void acceptForwardRef(QXmlInArchive &visitor, const impl::ObjectId &id) { visitor.visitForwardRef(this, id); } - Ref &getReference() { return _ref; } private: @@ -256,8 +252,6 @@ private: void accept(QXmlInArchive &visitor, const XmlTag &tag) { visitor.visit(this, tag); } - void acceptForwardRef(QXmlInArchive &visitor, const impl::ObjectId &id) { visitor.visitForwardRef(this, id); } - SetterRef &getReference() { return _ref; } private: @@ -275,8 +269,6 @@ private: void accept(QXmlInArchive &visitor, const XmlTag &tag) { visitor.visit(this, tag); } - void acceptForwardRef(QXmlInArchive &visitor, const impl::ObjectId &id) { visitor.visitForwardRef(this, id); } - GetterSetterRef &getReference() { return _ref; } private: @@ -294,8 +286,6 @@ private: void accept(QXmlInArchive &visitor, const XmlTag &tag) { visitor.visit(this, tag); } - void acceptForwardRef(QXmlInArchive &visitor, const impl::ObjectId &id) { visitor.visitForwardRef(this, id); } - SetFuncRef &getReference() { return _ref; } private: @@ -313,35 +303,23 @@ private: void accept(QXmlInArchive &visitor, const XmlTag &tag) { visitor.visit(this, tag); } - void acceptForwardRef(QXmlInArchive &visitor, const impl::ObjectId &id) { visitor.visitForwardRef(this, id); } - GetSetFuncRef &getReference() { return _ref; } private: GetSetFuncRef _ref; }; - struct ForwardReference { - ForwardReference(Node *node, const impl::ObjectId &id) : _node(node), _id(id) { } - Node *_node; - impl::ObjectId _id; - }; - public: explicit QXmlInArchive(QXmlStreamReader &stream) : _stream(stream), _end_tag_was_read(false), - _root_node(0), _current_ref_node(0) { } ~QXmlInArchive() { - foreach(const ForwardReference &forward_ref, _forward_references) { - forward_ref._node->acceptForwardRef(*this, forward_ref._id); - } } public: @@ -387,9 +365,7 @@ public: void append(const Tag &tag) { TagNode *node = new TagNode(tag); - if (_node_stack.empty()) { - _root_node = node; - } else { + if (!_node_stack.empty()) { _node_stack.top()->append(node); } _node_stack.push(node); @@ -399,9 +375,7 @@ public: void append(const Object &object) { ObjectNode *node = new ObjectNode(object); - if (_node_stack.empty()) { - _root_node = node; - } else { + if (!_node_stack.empty()) { _node_stack.top()->append(node); } _node_stack.push(node); @@ -409,13 +383,14 @@ public: void append(const End &) { - _node_stack.pop(); + Node *node = _node_stack.pop(); if (_node_stack.empty()) { XmlTag xml_tag = readTag(); - if (xml_tag._tag_name != _root_node->getQualifiedName() || xml_tag._end_tag) { + if (xml_tag._tag_name != node->getQualifiedName() || xml_tag._end_tag) { throw FileFormatException(); } - _root_node->accept(*this, xml_tag); + node->accept(*this, xml_tag); + delete node; } } @@ -587,12 +562,7 @@ public: if (_loading_ref_map.hasObject(id)) { p = _loading_ref_map.getObject(id); } else { - if (_current_ref_node == 0) { - throw UnexpectedForwardReference(); - } - _forward_references.append(ForwardReference(_current_ref_node, id)); - // node is eaten, also used as flag for forward references - _current_ref_node = 0; + throw UnexpectedForwardReference(); } } @@ -634,11 +604,6 @@ private: throw FileFormatException(); } - void visitForwardRef(Node *, const impl::ObjectId &) - { - throw UnexpectedForwardReference(); - } - void visit(TagNode *node, const XmlTag &) { readChildren(node); @@ -656,7 +621,7 @@ private: template void visit(BaseNode *node, const XmlTag &) { - (*this) >> node->getBase().getBase(); + load(*this, node->getBase().getBase(), node->getBase().getParameters()); XmlTag xml_tag = readTag(); if (!xml_tag._end_tag || xml_tag._tag_name != node->getBase().getQualifiedName()) { throw FileFormatException(); @@ -666,7 +631,7 @@ private: template void visit(AttrNode *node, const XmlTag &) { - (*this) >> *node->getAttribute().getValue(); + load(*this, *node->getAttribute().getValue(), node->getAttribute().getParameters()); XmlTag xml_tag = readTag(); if (!xml_tag._end_tag || xml_tag._tag_name != node->getAttribute().getQualifiedName()) { throw FileFormatException(); @@ -677,7 +642,7 @@ private: void visit(SetterAttrNode *node, const XmlTag &) { T value; - (*this) >> value; + load(*this, value, node->getAttribute().getParameters()); (node->getAttribute().getObject().*(node->getAttribute().getSetter()))(value); XmlTag xml_tag = readTag(); if (!xml_tag._end_tag || xml_tag._tag_name != node->getAttribute().getQualifiedName()) { @@ -689,7 +654,7 @@ private: void visit(SetterAttrNode *node, const XmlTag &) { T value; - (*this) >> value; + load(*this, value, node->getAttribute().getParameters()); (node->getAttribute().getObject().*(node->getAttribute().getSetter()))(value); XmlTag xml_tag = readTag(); if (!xml_tag._end_tag || xml_tag._tag_name != node->getAttribute().getQualifiedName()) { @@ -701,7 +666,7 @@ private: void visit(GetterSetterAttrNode *node, const XmlTag &) { V value; - (*this) >> value; + load(*this, value, node->getAttribute().getParameters()); (node->getAttribute().getObject().*(node->getAttribute().getSetter()))(value); XmlTag xml_tag = readTag(); if (!xml_tag._end_tag || xml_tag._tag_name != node->getAttribute().getQualifiedName()) { @@ -713,7 +678,7 @@ private: void visit(GetterSetterAttrNode *node, const XmlTag &) { V value; - (*this) >> value; + load(*this, value, node->getAttribute().getParameters()); (node->getAttribute().getObject().*(node->getAttribute().getSetter()))(value); XmlTag xml_tag = readTag(); if (!xml_tag._end_tag || xml_tag._tag_name != node->getAttribute().getQualifiedName()) { @@ -725,7 +690,7 @@ private: void visit(SetFuncAttrNode *node, const XmlTag &) { T value; - (*this) >> value; + load(*this, value, node->getAttribute().getParameters()); (node->getAttribute().getSetFunc())(node->getAttribute().getObject(), value); XmlTag xml_tag = readTag(); if (!xml_tag._end_tag || xml_tag._tag_name != node->getAttribute().getQualifiedName()) { @@ -737,7 +702,7 @@ private: void visit(SetFuncAttrNode *node, const XmlTag &) { T value; - (*this) >> value; + load(*this, value, node->getAttribute().getParameters()); (node->getAttribute().getSetFunc())(node->getAttribute().getObject(), value); XmlTag xml_tag = readTag(); if (!xml_tag._end_tag || xml_tag._tag_name != node->getAttribute().getQualifiedName()) { @@ -749,7 +714,7 @@ private: void visit(GetSetFuncAttrNode *node, const XmlTag &) { V value; - (*this) >> value; + load(*this, value, node->getAttribute().getParameters()); (node->getAttribute().getSetFunc())(node->getAttribute().getObject(), value); XmlTag xml_tag = readTag(); if (!xml_tag._end_tag || xml_tag._tag_name != node->getAttribute().getQualifiedName()) { @@ -761,7 +726,7 @@ private: void visit(GetSetFuncAttrNode *node, const XmlTag &) { V value; - (*this) >> value; + load(*this, value, node->getAttribute().getParameters()); (node->getAttribute().getSetFunc())(node->getAttribute().getObject(), value); XmlTag xml_tag = readTag(); if (!xml_tag._end_tag || xml_tag._tag_name != node->getAttribute().getQualifiedName()) { @@ -774,8 +739,8 @@ private: { _current_ref_node = node; T value = T(); - (*this) >> value; - if (_current_ref_node != 0) { // ref node was not eaten by forward reference + load(*this, value, node->getReference().getParameters()); + if (_current_ref_node != 0) { // ref node was not consumed by forward reference *node->getReference().getValue() = value; _current_ref_node = 0; } @@ -785,23 +750,13 @@ private: } } - template - void visitForwardRef(RefNode *node, const impl::ObjectId &id) - { - if (!_loading_ref_map.hasObject(id)) { - throw UnexpectedForwardReference(); - } - T value = _loading_ref_map.getObject(id); - *(node->getReference().getValue()) = value; - } - template void visit(SetterRefNode *node, const XmlTag &) { _current_ref_node = node; T value; - (*this) >> value; - if (_current_ref_node != 0) { // ref node was not eaten by forward reference + load(*this, value, node->getReference().getParameters()); + if (_current_ref_node != 0) { // ref node was not consumed by forward reference (node->getReference().getObject().*(node->getReference().getSetter()))(value); _current_ref_node = 0; } @@ -816,8 +771,8 @@ private: { _current_ref_node = node; T value; - (*this) >> value; - if (_current_ref_node != 0) { // ref node was not eaten by forward reference + load(*this, value, node->getReference().getParameters()); + if (_current_ref_node != 0) { // ref node was not consumed by forward reference (node->getReference().getObject().*(node->getReference().getSetter()))(value); _current_ref_node = 0; } @@ -827,33 +782,13 @@ private: } } - template - void visitForwardRef(SetterRefNode *node, const impl::ObjectId &id) - { - if (!_loading_ref_map.hasObject(id)) { - throw UnexpectedForwardReference(); - } - T value = _loading_ref_map.getObject(id); - (node->getReference().getObject().*(node->getReference().getSetter()))(value); - } - - template - void visitForwardRef(SetterRefNode *node, const impl::ObjectId &id) - { - if (!_loading_ref_map.hasObject(id)) { - throw UnexpectedForwardReference(); - } - T value = _loading_ref_map.getObject(id); - (node->getReference().getObject().*(node->getReference().getSetter()))(value); - } - template void visit(GetterSetterRefNode *node, const XmlTag &) { _current_ref_node = node; V value; - (*this) >> value; - if (_current_ref_node != 0) { // ref node was not eaten by forward reference + load(*this, value, node->getReference().getParameters()); + if (_current_ref_node != 0) { // ref node was not consumed by forward reference (node->getReference().getObject().*(node->getReference().getSetter()))(value); _current_ref_node = 0; } @@ -868,8 +803,8 @@ private: { _current_ref_node = node; V value; - (*this) >> value; - if (_current_ref_node != 0) { // ref node was not eaten by forward reference + load(*this, value, node->getReference().getParameters()); + if (_current_ref_node != 0) { // ref node was not consumed by forward reference (node->getReference().getObject().*(node->getReference().getSetter()))(value); _current_ref_node = 0; } @@ -879,34 +814,14 @@ private: } } - template - void visitForwardRef(GetterSetterRefNode *node, const impl::ObjectId &id) - { - if (!_loading_ref_map.hasObject(id)) { - throw UnexpectedForwardReference(); - } - V value = _loading_ref_map.getObject(id); - (node->getReference().getObject().*(node->getReference().getSetter()))(value); - } - - template - void visitForwardRef(GetterSetterRefNode *node, const impl::ObjectId &id) - { - if (!_loading_ref_map.hasObject(id)) { - throw UnexpectedForwardReference(); - } - V value = _loading_ref_map.getObject(id); - (node->getReference().getObject().*(node->getReference().getSetter()))(value); - } - template void visit(SetFuncRefNode *node, const XmlTag &) { _current_ref_node = node; T value; - (*this) >> value; - if (_current_ref_node != 0) { // ref node was not eaten by forward reference - (node->getReference().getObject().*(node->getReference().getSetter()))(value); + load(*this, value, node->getReference().getParameters()); + if (_current_ref_node != 0) { // ref node was not consumed by forward reference + (node->getReference().getSetFunc())(node->getReference().getObject(), value); _current_ref_node = 0; } XmlTag xml_tag = readTag(); @@ -920,9 +835,9 @@ private: { _current_ref_node = node; T value; - (*this) >> value; - if (_current_ref_node != 0) { // ref node was not eaten by forward reference - (node->getReference().getObject().*(node->getReference().getSetter()))(value); + load(*this, value, node->getReference().getParameters()); + if (_current_ref_node != 0) { // ref node was not consumed by forward reference + (node->getReference().getSetFunc())(node->getReference().getObject(), value); _current_ref_node = 0; } XmlTag xml_tag = readTag(); @@ -931,34 +846,14 @@ private: } } - template - void visitForwardRef(SetFuncRefNode *node, const impl::ObjectId &id) - { - if (!_loading_ref_map.hasObject(id)) { - throw UnexpectedForwardReference(); - } - T value = _loading_ref_map.getObject(id); - (node->getReference().getObject().*(node->getReference().getSetter()))(value); - } - - template - void visitForwardRef(SetFuncRefNode *node, const impl::ObjectId &id) - { - if (!_loading_ref_map.hasObject(id)) { - throw UnexpectedForwardReference(); - } - T value = _loading_ref_map.getObject(id); - (node->getReference().getObject().*(node->getReference().getSetter()))(value); - } - template void visit(GetSetFuncRefNode *node, const XmlTag &) { _current_ref_node = node; V value; - (*this) >> value; - if (_current_ref_node != 0) { // ref node was not eaten by forward reference - (node->getReference().getObject().*(node->getReference().getSetter()))(value); + load(*this, value, node->getReference().getParameters()); + if (_current_ref_node != 0) { // ref node was not consumed by forward reference + (node->getReference().getSetFunc())(node->getReference().getObject(), value); _current_ref_node = 0; } XmlTag xml_tag = readTag(); @@ -972,9 +867,9 @@ private: { _current_ref_node = node; V value; - (*this) >> value; - if (_current_ref_node != 0) { // ref node was not eaten by forward reference - (node->getReference().getObject().*(node->getReference().getSetter()))(value); + load(*this, value, node->getReference().getParameters()); + if (_current_ref_node != 0) { // ref node was not consumed by forward reference + (node->getReference().getSetFunc())(node->getReference().getObject(), value); _current_ref_node = 0; } XmlTag xml_tag = readTag(); @@ -983,26 +878,6 @@ private: } } - template - void visitForwardRef(GetSetFuncRefNode *node, const impl::ObjectId &id) - { - if (!_loading_ref_map.hasObject(id)) { - throw UnexpectedForwardReference(); - } - V value = _loading_ref_map.getObject(id); - (node->getReference().getObject().*(node->getReference().getSetter()))(value); - } - - template - void visitForwardRef(GetSetFuncRefNode *node, const impl::ObjectId &id) - { - if (!_loading_ref_map.hasObject(id)) { - throw UnexpectedForwardReference(); - } - V value = _loading_ref_map.getObject(id); - (node->getReference().getObject().*(node->getReference().getSetter()))(value); - } - private: inline XmlTag readTag(); @@ -1012,11 +887,9 @@ private: private: QXmlStreamReader &_stream; bool _end_tag_was_read; - Node *_root_node; QStack _node_stack; impl::LoadingRefMap _loading_ref_map; Node *_current_ref_node; - QList _forward_references; }; diff --git a/src/libs/3rdparty/modeling/qtserialization/inc/qark/qxmloutarchive.h b/src/libs/3rdparty/modeling/qtserialization/inc/qark/qxmloutarchive.h index 50cad74686f..e5299f16b53 100644 --- a/src/libs/3rdparty/modeling/qtserialization/inc/qark/qxmloutarchive.h +++ b/src/libs/3rdparty/modeling/qtserialization/inc/qark/qxmloutarchive.h @@ -49,8 +49,13 @@ class QXmlOutArchive : { public: + class UnsupportedForwardReference : + public std::exception + { + }; + class DanglingReferences : - public std::exception + public std::exception { }; @@ -58,6 +63,7 @@ public: static const bool out_archive = true; public: + QXmlOutArchive(QXmlStreamWriter &stream) : _stream(stream), _next_pointer_is_reference(false) @@ -76,6 +82,9 @@ public: template void write(T *p) { + if (!_saving_ref_map.hasDefinedRef(p)) { + throw UnsupportedForwardReference(); + } write(_saving_ref_map.getRef(p).get()); } diff --git a/src/libs/3rdparty/modeling/qtserialization/inc/qark/reference.h b/src/libs/3rdparty/modeling/qtserialization/inc/qark/reference.h index 2e733bf833e..d631c3f294e 100644 --- a/src/libs/3rdparty/modeling/qtserialization/inc/qark/reference.h +++ b/src/libs/3rdparty/modeling/qtserialization/inc/qark/reference.h @@ -31,6 +31,8 @@ #ifndef QARK_REFERENCE_H #define QARK_REFERENCE_H +#include "parameters.h" + #include namespace qark { @@ -38,19 +40,29 @@ namespace qark { template class Ref { public: - explicit Ref(const QString &qualified_name, T *value) + Ref(const QString &qualified_name, T *value) : _qualified_name(qualified_name), _value(value) { } + Ref(const QString &qualified_name, T *value, const Parameters ¶meters) + : _qualified_name(qualified_name), + _value(value), + _parameters(parameters) + { + } + const QString &getQualifiedName() const { return _qualified_name; } T *getValue() const { return _value; } + Parameters getParameters() const { return _parameters; } + private: QString _qualified_name; T *_value; + Parameters _parameters; }; template @@ -59,32 +71,56 @@ Ref ref(const QString &qualified_name, T * const &value) return Ref(qualified_name, &value); } +template +Ref ref(const QString &qualified_name, T * const &value, const Parameters ¶meters) +{ + return Ref(qualified_name, &value, parameters); +} + template Ref ref(const QString &qualified_name, T *&value) { return Ref(qualified_name, &value); } +template +Ref ref(const QString &qualified_name, T *&value, const Parameters ¶meters) +{ + return Ref(qualified_name, &value, parameters); +} + + template class GetterRef { public: - explicit GetterRef(const QString &qualified_name, const U &u, T (U::*getter)() const) + GetterRef(const QString &qualified_name, const U &u, T (U::*getter)() const) : _qualified_name(qualified_name), _u(u), _getter(getter) { } + GetterRef(const QString &qualified_name, const U &u, T (U::*getter)() const, const Parameters ¶meters) + : _qualified_name(qualified_name), + _u(u), + _getter(getter), + _parameters(parameters) + { + } + const QString &getQualifiedName() const { return _qualified_name; } const U &getObject() const { return _u; } T (U::*getGetter() const)() const { return _getter; } + Parameters getParameters() const { return _parameters; } + private: QString _qualified_name; const U &_u; T (U::*_getter)() const; + Parameters _parameters; }; template @@ -93,27 +129,44 @@ GetterRef ref(const QString &qualified_name, const U &u, T *(U::*getter) return GetterRef(qualified_name, u, getter); } +template +GetterRef ref(const QString &qualified_name, const U &u, T *(U::*getter)() const, const Parameters ¶meters) +{ + return GetterRef(qualified_name, u, getter, parameters); +} + template class SetterRef { public: - explicit SetterRef(const QString &qualified_name, U &u, void (U::*setter)(T)) + SetterRef(const QString &qualified_name, U &u, void (U::*setter)(T)) : _qualified_name(qualified_name), _u(u), _setter(setter) { } + SetterRef(const QString &qualified_name, U &u, void (U::*setter)(T), const Parameters ¶meters) + : _qualified_name(qualified_name), + _u(u), + _setter(setter), + _parameters(parameters) + { + } + const QString &getQualifiedName() const { return _qualified_name; } U &getObject() const { return _u; } void (U::*getSetter() const)(T) { return _setter; } + Parameters getParameters() const { return _parameters; } + private: QString _qualified_name; U &_u; void (U::*_setter)(T); + Parameters _parameters; }; template @@ -122,16 +175,29 @@ SetterRef ref(const QString &qualified_name, U &u, void (U::*setter)(T * return SetterRef(qualified_name, u, setter); } +template +SetterRef ref(const QString &qualified_name, U &u, void (U::*setter)(T *), const Parameters ¶meters) +{ + return SetterRef(qualified_name, u, setter, parameters); +} + template SetterRef ref(const QString &qualified_name, U &u, void (U::*setter)(T * const &)) { return SetterRef(qualified_name, u, setter); } +template +SetterRef ref(const QString &qualified_name, U &u, void (U::*setter)(T * const &), const Parameters ¶meters) +{ + return SetterRef(qualified_name, u, setter, parameters); +} + + template class GetterSetterRef { public: - explicit GetterSetterRef(const QString &qualified_name, U &u, T (U::*getter)() const, void (U::*setter)(V)) + GetterSetterRef(const QString &qualified_name, U &u, T (U::*getter)() const, void (U::*setter)(V)) : _qualified_name(qualified_name), _u(u), _getter(getter), @@ -139,6 +205,15 @@ public: { } + GetterSetterRef(const QString &qualified_name, U &u, T (U::*getter)() const, void (U::*setter)(V), const Parameters ¶meters) + : _qualified_name(qualified_name), + _u(u), + _getter(getter), + _setter(setter), + _parameters(parameters) + { + } + const QString &getQualifiedName() const { return _qualified_name; } U &getObject() const { return _u; } @@ -147,11 +222,14 @@ public: void (U::*getSetter() const)(V) { return _setter; } + Parameters getParameters() const { return _parameters; } + private: QString _qualified_name; U &_u; T (U::*_getter)() const; void (U::*_setter)(V); + Parameters _parameters; }; template @@ -160,32 +238,56 @@ GetterSetterRef ref(const QString &qualified_name, U &u, T *(U::*ge return GetterSetterRef(qualified_name, u, getter, setter); } +template +GetterSetterRef ref(const QString &qualified_name, U &u, T *(U::*getter)() const, void (U::*setter)(V *), const Parameters ¶meters) +{ + return GetterSetterRef(qualified_name, u, getter, setter, parameters); +} + template GetterSetterRef ref(const QString &qualified_name, U &u, T *(U::*getter)() const, void (U::*setter)(V * const &)) { return GetterSetterRef(qualified_name, u, getter, setter); } +template +GetterSetterRef ref(const QString &qualified_name, U &u, T *(U::*getter)() const, void (U::*setter)(V * const &), const Parameters ¶meters) +{ + return GetterSetterRef(qualified_name, u, getter, setter, parameters); +} + + template class GetFuncRef { public: - explicit GetFuncRef(const QString &qualified_name, const U &u, T (*get_func)(const U &)) + GetFuncRef(const QString &qualified_name, const U &u, T (*get_func)(const U &)) : _qualified_name(qualified_name), _u(u), _get_func(get_func) { } + GetFuncRef(const QString &qualified_name, const U &u, T (*get_func)(const U &), const Parameters ¶meters) + : _qualified_name(qualified_name), + _u(u), + _get_func(get_func), + _parameters(parameters) + { + } + const QString &getQualifiedName() const { return _qualified_name; } const U &getObject() const { return _u; } T (*getGetFunc() const)(const U &) { return _get_func; } + Parameters getParameters() const { return _parameters; } + private: QString _qualified_name; const U &_u; T (*_get_func)(const U &); + Parameters _parameters; }; template @@ -194,27 +296,44 @@ GetFuncRef ref(const QString &qualified_name, const U &u, T *(*get_func) return GetFuncRef(qualified_name, u, get_func); } +template +GetFuncRef ref(const QString &qualified_name, const U &u, T *(*get_func)(const U &), const Parameters ¶meters) +{ + return GetFuncRef(qualified_name, u, get_func, parameters); +} + template class SetFuncRef { public: - explicit SetFuncRef(const QString &qualified_name, U &u, void (*set_func)(U &, T)) + SetFuncRef(const QString &qualified_name, U &u, void (*set_func)(U &, T)) : _qualified_name(qualified_name), _u(u), _set_func(set_func) { } + SetFuncRef(const QString &qualified_name, U &u, void (*set_func)(U &, T), const Parameters ¶meters) + : _qualified_name(qualified_name), + _u(u), + _set_func(set_func), + _parameters(parameters) + { + } + const QString &getQualifiedName() const { return _qualified_name; } U &getObject() const { return _u; } void (*getSetFunc() const)(U &, T) { return _set_func; } + Parameters getParameters() const { return _parameters; } + private: QString _qualified_name; U &_u; void (*_set_func)(U &, T); + Parameters _parameters; }; template @@ -223,16 +342,29 @@ SetFuncRef ref(const QString &qualified_name, U &u, void (*set_func)(U & return SetFuncRef(qualified_name, u, set_func); } +template +SetFuncRef ref(const QString &qualified_name, U &u, void (*set_func)(U &, T *), const Parameters ¶meters) +{ + return SetFuncRef(qualified_name, u, set_func, parameters); +} + template SetFuncRef ref(const QString &qualified_name, U &u, void (*set_func)(U &, T * const &)) { return SetFuncRef(qualified_name, u, set_func); } +template +SetFuncRef ref(const QString &qualified_name, U &u, void (*set_func)(U &, T * const &), const Parameters ¶meters) +{ + return SetFuncRef(qualified_name, u, set_func, parameters); +} + + template class GetSetFuncRef { public: - explicit GetSetFuncRef(const QString &qualified_name, U &u, T (*get_func)(const U &), void (*set_func)(U &, V)) + GetSetFuncRef(const QString &qualified_name, U &u, T (*get_func)(const U &), void (*set_func)(U &, V)) : _qualified_name(qualified_name), _u(u), _get_func(get_func), @@ -240,6 +372,15 @@ public: { } + GetSetFuncRef(const QString &qualified_name, U &u, T (*get_func)(const U &), void (*set_func)(U &, V), const Parameters ¶meters) + : _qualified_name(qualified_name), + _u(u), + _get_func(get_func), + _set_func(set_func), + _parameters(parameters) + { + } + const QString &getQualifiedName() const { return _qualified_name; } U &getObject() const { return _u; } @@ -248,11 +389,14 @@ public: void (*getSetFunc() const)(U &, V) { return _set_func; } + Parameters getParameters() const { return _parameters; } + private: QString _qualified_name; U &_u; T (*_get_func)(const U &); void (*_set_func)(U &, V); + Parameters _parameters; }; template @@ -261,12 +405,24 @@ GetSetFuncRef ref(const QString &qualified_name, U &u, T *(*get_fun return GetSetFuncRef(qualified_name, u, get_func, set_func); } +template +GetSetFuncRef ref(const QString &qualified_name, U &u, T *(*get_func)(const U &), void (*set_func)(U &, V *), const Parameters ¶meters) +{ + return GetSetFuncRef(qualified_name, u, get_func, set_func, parameters); +} + template GetSetFuncRef ref(const QString &qualified_name, U &u, T *(*get_func)(const U &), void (*set_func)(U &, V * const &)) { return GetSetFuncRef(qualified_name, u, get_func, set_func); } +template +GetSetFuncRef ref(const QString &qualified_name, U &u, T *(*get_func)(const U &), void (*set_func)(U &, V * const &), const Parameters ¶meters) +{ + return GetSetFuncRef(qualified_name, u, get_func, set_func, parameters); +} + } #endif // QARK_REFERENCE_H diff --git a/src/libs/3rdparty/modeling/qtserialization/inc/qark/serialize.h b/src/libs/3rdparty/modeling/qtserialization/inc/qark/serialize.h index 84e1e415b6d..f471d3460f9 100644 --- a/src/libs/3rdparty/modeling/qtserialization/inc/qark/serialize.h +++ b/src/libs/3rdparty/modeling/qtserialization/inc/qark/serialize.h @@ -38,6 +38,7 @@ #include "access.h" #include "typeregistry.h" +#include "serialize_pointer.h" #include "serialize_basic.h" #include "serialize_container.h" #include "serialize_enum.h" @@ -51,102 +52,27 @@ namespace qark { template inline Archive &operator<<(Archive &archive, const T &t) { - save(archive, t); + save(archive, t, Parameters()); return archive; } template inline Archive &operator>>(Archive &archive, T &t) { - load(archive, t); + load(archive, t, Parameters()); return archive; } template typename std::enable_if::type operator||(Archive &archive, T &t) { - save(archive, (const T &) t); - return archive; + return archive << t; } template typename std::enable_if::type operator||(Archive &archive, T &t) { - load(archive, t); - return archive; -} - -template -inline Archive &operator<<(Archive &archive, T *p) -{ - if (p) { - if (archive.isReference(p)) { - archive.beginPointer(); - archive.write(p); - archive.endPointer(); - } else { - if (typeid(*p) == typeid(T)) { - archive.beginInstance(); - registry::save_pointer(archive, p); - archive.endInstance(); - } else { - archive.beginInstance(get_type_uid(*p)); - //typename registry::TypeRegistry::type>::type_info type_data - // = get_type_info::type>(*p); - typename registry::TypeRegistry::type_info type_data = get_type_info(*p); - if (type_data.save_func == 0) { - throw unregistered_type(); - } else { - type_data.save_func(archive, p); - } - archive.endInstance(); - } - } - } else { - archive.beginNullPointer(); - archive.endNullPointer(); - } - return archive; -} - -template -inline Archive &operator>>(Archive &archive, T *&p) -{ - typename Archive::ReferenceTag ref_tag = archive.readReferenceTag(); - switch (ref_tag.kind) { - case Archive::NULLPOINTER: - p = 0; - break; - case Archive::POINTER: - archive.read(p); - break; - case Archive::INSTANCE: - if (ref_tag.type_name.isEmpty()) { - registry::load_non_virtual_pointer(archive, p); - } else { - typename registry::TypeRegistry::type_info type_data = get_type_info(ref_tag.type_name); - if (type_data.load_func == 0) { - throw unregistered_type(); - } else { - type_data.load_func(archive, p); - } - } - break; - } - archive.readReferenceEndTag(ref_tag.kind); - return archive; -} - -template -typename std::enable_if::type operator||(Archive &archive, T *&p) -{ - return archive << p; -} - -template -typename std::enable_if::type operator||(Archive &archive, T *&p) -{ - return archive >> p; + return archive >> t; } template @@ -175,32 +101,6 @@ typename std::enable_if::type operator||(Archive return archive >> f; } -template -inline Archive &operator<<(Archive &archive, void (*f)(Archive &)) -{ - f(archive); - return archive; -} - -template -inline Archive &operator>>(Archive &archive, void (*f)(Archive &)) -{ - f(archive); - return archive; -} - -template -typename std::enable_if::type operator||(Archive &archive, void (*f)(Archive &)) -{ - return archive << f; -} - -template -typename std::enable_if::type operator||(Archive &archive, void (*f)(Archive &)) -{ - return archive >> f; -} - template inline Archive &operator<<(Archive &archive, const Tag &tag) { @@ -311,7 +211,7 @@ template Archive &operator<<(Archive &archive, const Attr &attr) { archive.beginAttribute(attr); - archive << *attr.getValue(); + save(archive, *attr.getValue(), attr.getParameters()); archive.endAttribute(attr); return archive; } @@ -336,10 +236,23 @@ typename std::enable_if::type operator||(Archive } template -Archive &operator<<(Archive &archive, const GetterAttr &attr) +typename std::enable_if::value, Archive &>::type +operator<<(Archive &archive, const GetterAttr &attr) +{ + if (!((attr.getObject().*(attr.getGetter()))() == (U().*(attr.getGetter()))())) { + archive.beginAttribute(attr); + save(archive, (attr.getObject().*(attr.getGetter()))(), attr.getParameters()); + archive.endAttribute(attr); + } + return archive; +} + +template +typename std::enable_if::value, Archive &>::type +operator<<(Archive &archive, const GetterAttr &attr) { archive.beginAttribute(attr); - archive << (attr.getObject().*(attr.getGetter()))(); + save(archive, (attr.getObject().*(attr.getGetter()))(), attr.getParameters()); archive.endAttribute(attr); return archive; } @@ -358,7 +271,7 @@ operator<<(Archive &archive, const GetterSetterAttr &attr) { if (!((attr.getObject().*(attr.getGetter()))() == (U().*(attr.getGetter()))())) { archive.beginAttribute(attr); - archive << (attr.getObject().*(attr.getGetter()))(); + save(archive, (attr.getObject().*(attr.getGetter()))(), attr.getParameters()); archive.endAttribute(attr); } return archive; @@ -370,7 +283,7 @@ typename std::enable_if::value, Archive &>::type operator<<(Archive &archive, const GetterSetterAttr &attr) { archive.beginAttribute(attr); - archive << (attr.getObject().*(attr.getGetter()))(); + save(archive, (attr.getObject().*(attr.getGetter()))(), attr.getParameters()); archive.endAttribute(attr); return archive; } @@ -398,7 +311,7 @@ template Archive &operator<<(Archive &archive, const GetFuncAttr &attr) { archive.beginAttribute(attr); - archive << ((*attr.getGetFunc())(attr.getObject())); + save(archive, ((*attr.getGetFunc())(attr.getObject())), attr.getParameters()); archive.endAttribute(attr); return archive; } @@ -414,7 +327,7 @@ template Archive &operator<<(Archive &archive, const GetSetFuncAttr &attr) { archive.beginAttribute(attr); - archive << ((*attr.getGetFunc())(attr.getObject())); + save(archive, ((*attr.getGetFunc())(attr.getObject())), attr.getParameters()); archive.endAttribute(attr); return archive; } @@ -442,7 +355,7 @@ template Archive &operator<<(Archive &archive, const Ref &ref) { archive.beginReference(ref); - archive << *ref.getValue(); + save(archive, *ref.getValue(), ref.getParameters()); archive.endReference(ref); return archive; } @@ -451,7 +364,7 @@ template Archive &operator<<(Archive &archive, const Ref &ref) { archive.beginReference(ref); - archive << *ref.getValue(); + save(archive, *ref.getValue(), ref.getParameters()); archive.endReference(ref); return archive; } @@ -467,7 +380,7 @@ template typename std::enable_if::type operator||(Archive &archive, const Ref &ref) { archive.beginReference(ref); - archive << *ref.getValue(); + save(archive, *ref.getValue(), ref.getParameters()); archive.endReference(ref); return archive; } @@ -482,7 +395,7 @@ template Archive &operator<<(Archive &archive, const GetterRef &ref) { archive.beginReference(ref); - archive << (ref.getObject().*(ref.getGetter()))(); + save(archive, (ref.getObject().*(ref.getGetter()))(), ref.getParameters()); archive.endReference(ref); return archive; } @@ -498,7 +411,7 @@ template Archive &operator<<(Archive &archive, const GetterSetterRef &ref) { archive.beginReference(ref); - archive << (ref.getObject().*(ref.getGetter()))(); + save(archive, (ref.getObject().*(ref.getGetter()))(), ref.getParameters()); archive.endReference(ref); return archive; } @@ -526,7 +439,7 @@ template Archive &operator<<(Archive &archive, const GetFuncRef &ref) { archive.beginReference(ref); - archive << ref.getGetFunc()(ref.getObject()); + save(archive, ref.getGetFunc()(ref.getObject()), ref.getParameters()); archive.endReference(ref); return archive; } @@ -542,7 +455,7 @@ template Archive &operator<<(Archive &archive, const GetSetFuncRef &ref) { archive.beginReference(ref); - archive << ref.getGetFunc()(ref.getObject()); + save(archive, ref.getGetFunc()(ref.getObject()), ref.getParameters()); archive.endReference(ref); return archive; } diff --git a/src/libs/3rdparty/modeling/qtserialization/inc/qark/serialize_basic.h b/src/libs/3rdparty/modeling/qtserialization/inc/qark/serialize_basic.h index a50b6874d83..05d3e82d481 100644 --- a/src/libs/3rdparty/modeling/qtserialization/inc/qark/serialize_basic.h +++ b/src/libs/3rdparty/modeling/qtserialization/inc/qark/serialize_basic.h @@ -31,6 +31,7 @@ #ifndef QARK_SERIALIZE_BASIC_H #define QARK_SERIALIZE_BASIC_H +#include "parameters.h" #include "qstringparser/qstringparser.h" #include @@ -42,12 +43,12 @@ #define QARK_BASIC_SAVELOAD(TYPE) \ template \ - inline void save(Archive &archive, TYPE v) \ + inline void save(Archive &archive, TYPE v, const Parameters &) \ { \ archive.write(v); \ } \ template \ - inline void load(Archive &archive, TYPE &v) \ + inline void load(Archive &archive, TYPE &v, const Parameters &) \ { \ archive.read(&v); \ } @@ -79,13 +80,13 @@ QARK_BASIC_SAVELOAD(QString) // QPointF template -inline void save(Archive &archive, const QPointF &point) +inline void save(Archive &archive, const QPointF &point, const Parameters &) { archive.write(QString(QStringLiteral("x:%1;y:%2")).arg(point.x()).arg(point.y())); } template -inline void load(Archive &archive, QPointF &point) +inline void load(Archive &archive, QPointF &point, const Parameters &) { QString s; archive.read(&s); @@ -98,13 +99,13 @@ inline void load(Archive &archive, QPointF &point) // QRectF template -inline void save(Archive &archive, const QRectF &rect) +inline void save(Archive &archive, const QRectF &rect, const Parameters &) { archive.write(QString(QStringLiteral("x:%1;y:%2;w:%3;h:%4")).arg(rect.x()).arg(rect.y()).arg(rect.width()).arg(rect.height())); } template -inline void load(Archive &archive, QRectF &point) +inline void load(Archive &archive, QRectF &point, const Parameters &) { QString s; archive.read(&s); @@ -117,13 +118,13 @@ inline void load(Archive &archive, QRectF &point) // QDateTime template -inline void save(Archive &archive, const QDateTime &date_time) +inline void save(Archive &archive, const QDateTime &date_time, const Parameters &) { archive << date_time.toMSecsSinceEpoch(); } template -inline void load(Archive &archive, QDateTime &date_time) +inline void load(Archive &archive, QDateTime &date_time, const Parameters &) { qint64 t; archive >> t; diff --git a/src/libs/3rdparty/modeling/qtserialization/inc/qark/serialize_container.h b/src/libs/3rdparty/modeling/qtserialization/inc/qark/serialize_container.h index 8d5a25c433a..be6bb3d4e92 100644 --- a/src/libs/3rdparty/modeling/qtserialization/inc/qark/serialize_container.h +++ b/src/libs/3rdparty/modeling/qtserialization/inc/qark/serialize_container.h @@ -31,31 +31,22 @@ #ifndef QARK_SERIALIZE_CONTAINER_H #define QARK_SERIALIZE_CONTAINER_H -#include "flag.h" +#include "parameters.h" #include #include namespace qark { -namespace impl { -static Flag container_item_ref_flag; -} - -template -inline void ref_item(Archive &archive) -{ - archive.setFlag(impl::container_item_ref_flag); -} +static Flag ENFORCE_REFERENCED_ITEMS; // QList template -inline void save(Archive &archive, const QList &list) +inline void save(Archive &archive, const QList &list, const Parameters &) { archive << tag("qlist"); - archive.clearFlag(impl::container_item_ref_flag); foreach (const T &t, list) { archive << attr(QStringLiteral("item"), t); } @@ -63,10 +54,10 @@ inline void save(Archive &archive, const QList &list) } template -inline void save(Archive &archive, const QList &list) +inline void save(Archive &archive, const QList &list, const Parameters ¶meters) { archive << tag("qlist"); - if (archive.takeFlag(impl::container_item_ref_flag)) { + if (parameters.hasFlag(ENFORCE_REFERENCED_ITEMS)) { foreach (const T *t, list) { archive << ref(QStringLiteral("item"), t); } @@ -79,7 +70,7 @@ inline void save(Archive &archive, const QList &list) } template -inline void load(Archive &archive, QList &list) +inline void load(Archive &archive, QList &list, const Parameters &) { archive >> tag(QStringLiteral("qlist")); archive >> attr, const T &>(QStringLiteral("item"), list, &QList::append); @@ -87,10 +78,10 @@ inline void load(Archive &archive, QList &list) } template -inline void load(Archive &archive, QList &list) +inline void load(Archive &archive, QList &list, const Parameters ¶meters) { archive >> tag(QStringLiteral("qlist")); - if (archive.takeFlag(impl::container_item_ref_flag)) { + if (parameters.hasFlag(ENFORCE_REFERENCED_ITEMS)) { // why does the following line not compile but the line below selects the correct function? //archive >> ref, T * const &>("item", list, &QList::append); archive >> ref(QStringLiteral("item"), list, &QList::append); @@ -104,10 +95,9 @@ inline void load(Archive &archive, QList &list) // QSet template -inline void save(Archive &archive, const QSet &set) +inline void save(Archive &archive, const QSet &set, const Parameters &) { archive << tag("qset"); - archive.clearFlag(impl::container_item_ref_flag); foreach (const T &t, set) { archive << attr(QStringLiteral("item"), t); } @@ -115,10 +105,10 @@ inline void save(Archive &archive, const QSet &set) } template -inline void save(Archive &archive, const QSet &set) +inline void save(Archive &archive, const QSet &set, const Parameters ¶meters) { archive << tag("qset"); - if (archive.takeFlag(impl::container_item_ref_flag)) { + if (parameters.hasFlag(ENFORCE_REFERENCED_ITEMS)) { foreach (const T *t, set) { archive << ref(QStringLiteral("item"), t); } @@ -140,7 +130,7 @@ void insertIntoSet(QSet &set, const T &t) { } template -inline void load(Archive &archive, QSet &set) +inline void load(Archive &archive, QSet &set, const Parameters &) { archive >> tag(QStringLiteral("qset")); archive >> attr, const T &>(QStringLiteral("item"), set, &impl::insertIntoSet); @@ -148,10 +138,10 @@ inline void load(Archive &archive, QSet &set) } template -inline void load(Archive &archive, QSet &set) +inline void load(Archive &archive, QSet &set, const Parameters ¶meters) { archive >> tag(QStringLiteral("qset")); - if (archive.takeFlag(impl::container_item_ref_flag)) { + if (parameters.hasFlag(ENFORCE_REFERENCED_ITEMS)) { archive >> ref(QStringLiteral("item"), set, &impl::insertIntoSet); } else { archive >> attr, T * const &>(QStringLiteral("item"), set, &impl::insertIntoSet); @@ -177,7 +167,7 @@ public: } template -inline void save(Archive &archive, const impl::KeyValuePair &pair) +inline void save(Archive &archive, const impl::KeyValuePair &pair, const Parameters &) { archive << tag(QStringLiteral("pair")) << attr(QStringLiteral("key"), pair._key) @@ -186,7 +176,7 @@ inline void save(Archive &archive, const impl::KeyValuePair &pair) } template -inline void load(Archive &archive, impl::KeyValuePair &pair) +inline void load(Archive &archive, impl::KeyValuePair &pair, const Parameters &) { archive >> tag(QStringLiteral("pair")) >> attr(QStringLiteral("key"), pair._key) @@ -195,7 +185,7 @@ inline void load(Archive &archive, impl::KeyValuePair &pair) } template -inline void save(Archive &archive, const QHash &hash) +inline void save(Archive &archive, const QHash &hash, const Parameters &) { archive << tag(QStringLiteral("qhash")); for (typename QHash::const_iterator it = hash.begin(); it != hash.end(); ++it) { @@ -216,7 +206,7 @@ inline void keyValuePairInsert(QHash &hash, const KeyValuePair -inline void load(Archive &archive, QHash &hash) +inline void load(Archive &archive, QHash &hash, const Parameters &) { archive >> tag(QStringLiteral("qhash")); archive >> attr(QStringLiteral("item"), hash, &impl::keyValuePairInsert); diff --git a/src/libs/3rdparty/modeling/qtserialization/inc/qark/serialize_enum.h b/src/libs/3rdparty/modeling/qtserialization/inc/qark/serialize_enum.h index a2a7e46611c..b72561dd604 100644 --- a/src/libs/3rdparty/modeling/qtserialization/inc/qark/serialize_enum.h +++ b/src/libs/3rdparty/modeling/qtserialization/inc/qark/serialize_enum.h @@ -31,6 +31,8 @@ #ifndef QARK_SERIALIZE_ENUM_H #define QARK_SERIALIZE_ENUM_H +#include "parameters.h" + #include namespace qark { @@ -38,13 +40,13 @@ namespace qark { #if 0 // ambigous with default implementation in access.h template -inline typename std::enable_if::value, void>::type save(Archive &archive, const T &value) +inline typename std::enable_if::value, void>::type save(Archive &archive, const T &value, const Parameters &) { archive.write((int) value); } template -inline typename std::enable_if::value, void>::type load(Archive &archive, T &value) +inline typename std::enable_if::value, void>::type load(Archive &archive, T &value, const Parameters &) { int i = 0; archive.read(&i); @@ -55,12 +57,12 @@ inline typename std::enable_if::value, void>::type load(Archive #define QARK_SERIALIZE_ENUM(ENUM) \ template \ - inline void save(Archive &archive, const ENUM &e) \ + inline void save(Archive &archive, const ENUM &e, const Parameters &) \ { \ archive.write((int) e); \ } \ template \ - inline void load(Archive &archive, ENUM &e) \ + inline void load(Archive &archive, ENUM &e, const Parameters &) \ { \ int i = 0; \ archive.read(&i); \ @@ -68,13 +70,13 @@ inline typename std::enable_if::value, void>::type load(Archive } template -inline void save(Archive &archive, const QFlags &flags) +inline void save(Archive &archive, const QFlags &flags, const Parameters &) { archive.write((typename QFlags::Int) flags); } template -inline void load(Archive &archive, QFlags &flags) +inline void load(Archive &archive, QFlags &flags, const Parameters &) { typename QFlags::Int i = 0; archive.read(&i); diff --git a/src/libs/3rdparty/modeling/qtserialization/inc/qark/serialize_pointer.h b/src/libs/3rdparty/modeling/qtserialization/inc/qark/serialize_pointer.h new file mode 100644 index 00000000000..d90633a08bf --- /dev/null +++ b/src/libs/3rdparty/modeling/qtserialization/inc/qark/serialize_pointer.h @@ -0,0 +1,98 @@ +/*************************************************************************** +** +** Copyright (C) 2015 Jochen Becher +** Contact: http://www.qt.io/licensing +** +** This file is part of Qt Creator. +** +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms and +** conditions see http://www.qt.io/terms-conditions. For further information +** use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +****************************************************************************/ + +#ifndef QARK_SERIALIZE_POINTER_H +#define QARK_SERIALIZE_POINTER_H + +#include "typeregistry.h" + +namespace qark { + +template +inline void save(Archive &archive, T *p, const Parameters &) +{ + if (p) { + if (archive.isReference(p)) { + archive.beginPointer(); + archive.write(p); + archive.endPointer(); + } else { + if (typeid(*p) == typeid(T)) { + archive.beginInstance(); + registry::save_pointer(archive, p); + archive.endInstance(); + } else { + archive.beginInstance(get_type_uid(*p)); + typename registry::TypeRegistry::type_info type_data = get_type_info(*p); + if (type_data.save_func == 0) { + throw unregistered_type(); + } else { + type_data.save_func(archive, p); + } + archive.endInstance(); + } + } + } else { + archive.beginNullPointer(); + archive.endNullPointer(); + } +} + +template +void load(Archive &archive, T *&p, const Parameters &) +{ + typename Archive::ReferenceTag ref_tag = archive.readReferenceTag(); + switch (ref_tag.kind) { + case Archive::NULLPOINTER: + p = 0; + break; + case Archive::POINTER: + archive.read(p); + break; + case Archive::INSTANCE: + if (ref_tag.type_name.isEmpty()) { + registry::load_non_virtual_pointer(archive, p); + } else { + typename registry::TypeRegistry::type_info type_data = get_type_info(ref_tag.type_name); + if (type_data.load_func == 0) { + throw unregistered_type(); + } else { + type_data.load_func(archive, p); + } + } + break; + } + archive.readReferenceEndTag(ref_tag.kind); +} + +} + +#endif // QARK_SERIALIZE_POINTER_H + diff --git a/src/libs/3rdparty/modeling/qtserialization/inc/qark/tag.h b/src/libs/3rdparty/modeling/qtserialization/inc/qark/tag.h index c5075e24960..ae3a07b9f09 100644 --- a/src/libs/3rdparty/modeling/qtserialization/inc/qark/tag.h +++ b/src/libs/3rdparty/modeling/qtserialization/inc/qark/tag.h @@ -32,6 +32,7 @@ #define QARK_TAG_H #include "typeregistry.h" +#include "parameters.h" #include @@ -45,10 +46,19 @@ public: { } + Tag(const QString &qualified_name, const Parameters ¶meters) + : _qualified_name(qualified_name), + _parameters(parameters) + { + } + const QString &getQualifiedName() const { return _qualified_name; } + Parameters getParameters() const { return _parameters; } + private: QString _qualified_name; + Parameters _parameters; }; @@ -57,12 +67,18 @@ class Object : public Tag { public: - explicit Object(const QString &qualified_name, T *object) + Object(const QString &qualified_name, T *object) : Tag(qualified_name), _object(object) { } + Object(const QString &qualified_name, T *object, const Parameters ¶meters) + : Tag(qualified_name, parameters), + _object(object) + { + } + T *getObject() const { return _object; } private: @@ -75,28 +91,61 @@ inline Tag tag(const QString &qualified_name) return Tag(qualified_name); } +inline Tag tag(const QString &qualified_name, const Parameters ¶meters) +{ + return Tag(qualified_name, parameters); +} + inline Tag tag(const char *qualified_name) { return Tag(QLatin1String(qualified_name)); } +inline Tag tag(const char *qualified_name, const Parameters ¶meters) +{ + return Tag(QLatin1String(qualified_name), parameters); +} + template inline Object tag(T &object) { return Object(get_type_uid(), &object); } +template +inline Object tag(T &object, const Parameters ¶meters) +{ + return Object(get_type_uid(), &object, parameters); +} + template inline Object tag(const QString &qualified_name, T &object) { return Object(qualified_name, &object); } +template +inline Object tag(const QString &qualified_name, T &object, const Parameters ¶meters) +{ + return Object(qualified_name, &object, parameters); +} class End { public: - explicit End() { } + explicit End() + { + } + + explicit End(const Parameters ¶meters) + : _parameters(parameters) + { + } + + Parameters getParameters() const { return _parameters; } + +private: + Parameters _parameters; }; inline End end() @@ -104,6 +153,10 @@ inline End end() return End(); } +inline End end(const Parameters ¶meters) +{ + return End(parameters); +} } diff --git a/src/libs/3rdparty/modeling/qtserialization/inc/qark/typeregistry.h b/src/libs/3rdparty/modeling/qtserialization/inc/qark/typeregistry.h index 7b55995e9ca..89955c7bc89 100644 --- a/src/libs/3rdparty/modeling/qtserialization/inc/qark/typeregistry.h +++ b/src/libs/3rdparty/modeling/qtserialization/inc/qark/typeregistry.h @@ -31,6 +31,8 @@ #ifndef QARK_TYPEREGISTRY_H #define QARK_TYPEREGISTRY_H +#include "parameters.h" + #include "qmt/infrastructure/qmtassert.h" #include @@ -219,7 +221,7 @@ template Archive &save_pointer(Archive &ar, BASE * const &p) { DERIVED &t = dynamic_cast(*p); - ar << t; + save(ar, t, Parameters()); return ar; } @@ -227,7 +229,7 @@ template Archive &load_pointer(Archive &ar, BASE *&p) { DERIVED *t = new DERIVED(); - ar >> *t; + load(ar, *t, Parameters()); p = t; return ar; } @@ -324,13 +326,13 @@ typename registry::TypeRegistry::type_info get_type_info(const QStrin #define QARK_REGISTER_DERIVED_CLASS(INARCHIVE, OUTARCHIVE, DERIVED, BASE) \ template<> \ int qark::registry::DerivedTypeRegistry::__static_init = \ - qark::registry::DerivedTypeRegistry::__init(0, qark::registry::load_pointer); \ + qark::registry::DerivedTypeRegistry::__init(0, qark::registry::load_pointer); \ template<> \ int qark::registry::DerivedTypeRegistry::__static_init = \ - qark::registry::DerivedTypeRegistry::__init(qark::registry::save_pointer, 0); \ + qark::registry::DerivedTypeRegistry::__init(qark::registry::save_pointer, 0); \ template<> \ int qark::registry::DerivedTypeRegistry::type, typename std::add_const::type>::__static_init = \ - qark::registry::DerivedTypeRegistry::type, typename std::add_const::type>:: \ - __init(qark::registry::save_pointer::type, typename std::add_const::type>, 0); + qark::registry::DerivedTypeRegistry::type, typename std::add_const::type>:: \ + __init(qark::registry::save_pointer::type, typename std::add_const::type>, 0); #endif // QARK_TYPEREGISTRY_H diff --git a/src/libs/3rdparty/modeling/qtserialization/qtserialization.pri b/src/libs/3rdparty/modeling/qtserialization/qtserialization.pri index a573f446968..b822867e1ff 100644 --- a/src/libs/3rdparty/modeling/qtserialization/qtserialization.pri +++ b/src/libs/3rdparty/modeling/qtserialization/qtserialization.pri @@ -6,6 +6,7 @@ HEADERS += \ $$PWD/inc/qark/baseclass.h \ $$PWD/inc/qark/flag.h \ $$PWD/inc/qark/friend_access.h \ + $$PWD/inc/qark/parameters.h \ $$PWD/inc/qark/qxmlinarchive.h \ $$PWD/inc/qark/qxmloutarchive.h \ $$PWD/inc/qark/reference.h \ @@ -13,6 +14,7 @@ HEADERS += \ $$PWD/inc/qark/serialize_basic.h \ $$PWD/inc/qark/serialize_container.h \ $$PWD/inc/qark/serialize_enum.h \ + $$PWD/inc/qark/serialize_pointer.h \ $$PWD/inc/qark/tag.h \ $$PWD/inc/qark/typeregistry.h \ $$PWD/inc/qark/impl/loadingrefmap.h \ diff --git a/src/libs/modelinglib/modelinglib.qbs b/src/libs/modelinglib/modelinglib.qbs index 9caebd5d451..ced437f0a58 100644 --- a/src/libs/modelinglib/modelinglib.qbs +++ b/src/libs/modelinglib/modelinglib.qbs @@ -312,6 +312,7 @@ QtcLibrary { "inc/qark/impl/loadingrefmap.h", "inc/qark/impl/objectid.h", "inc/qark/impl/savingrefmap.h", + "inc/qark/parameters.h", "inc/qark/qxmlinarchive.h", "inc/qark/qxmloutarchive.h", "inc/qark/reference.h", @@ -319,6 +320,7 @@ QtcLibrary { "inc/qark/serialize_basic.h", "inc/qark/serialize_container.h", "inc/qark/serialize_enum.h", + "inc/qark/serialize_pointer.h", "inc/qark/tag.h", "inc/qark/typeregistry.h", "src/flag.cpp",