#pragma once #include #include "sketchlib_global.h" #include #include #include class QJsonObject; class QJsonValue; class SKETCHLIB_EXPORT BaseContainer : public QObject { Q_OBJECT Q_PROPERTY(QString do_objectID READ do_objectID CONSTANT) protected: explicit BaseContainer(QObject *parent = nullptr); public: const QString &do_objectID() const; void parseFromJson(const QJsonObject &jsonObj); static const QMap &missing(); protected: virtual bool parseProperty(const QString &key, const QJsonValue &value); private: static const QHash m_types; static QMap m_missing; QString m_do_objectID; };