|
|
|
#ifndef CFDSTRUCTDATAMANAGERBASE_H
|
|
|
|
#define CFDSTRUCTDATAMANAGERBASE_H
|
|
|
|
|
|
|
|
#include "CFDStructDataManager_global.h"
|
|
|
|
#include "CUIProperty/CUIConfig.h"
|
|
|
|
#include "CUIProperty/CUIDefine.h"
|
|
|
|
#include "CUIProperty/CUISigsCenter.h"
|
|
|
|
#include "rapidjson/document.h"
|
|
|
|
#include "rapidjson/stringbuffer.h"
|
|
|
|
#include "rapidjson/writer.h"
|
|
|
|
#include <QObject>
|
|
|
|
|
|
|
|
class CFDSTRUCTDATAMANAGER_EXPORT CFDStructDataManagerBase : public QObject {
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
explicit CFDStructDataManagerBase(QObject *parent = nullptr);
|
|
|
|
~CFDStructDataManagerBase();
|
|
|
|
// 获取参数界面的配置
|
|
|
|
virtual CUIConfig *getParamUIConfig();
|
|
|
|
// 将数据存入dom
|
|
|
|
virtual void saveDataToDom(rapidjson::Document &dom) = 0;
|
|
|
|
// 将数据从dom中读出
|
|
|
|
virtual void readDataFromDom(rapidjson::Document &dom) = 0;
|
|
|
|
|
|
|
|
signals:
|
|
|
|
|
|
|
|
protected:
|
|
|
|
CUIConfig *m_uiConfig = nullptr;
|
|
|
|
CUISigsCenter *m_cuiSigsCenter = nullptr;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
// json的写入
|
|
|
|
void jsonAdd(rapidjson::Document &document, QVariant value, QVector<QVariant> path);
|
|
|
|
// 读json
|
|
|
|
void jsonRead(rapidjson::Document &document, QVariant &value, QVector<QVariant> path);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CFDSTRUCTDATAMANAGERBASE_H
|