36 lines
723 B
C
36 lines
723 B
C
|
#ifndef ANALYSISJSON_H
|
||
|
#define ANALYSISJSON_H
|
||
|
#include <QString>
|
||
|
#include <QJsonDocument>
|
||
|
#include <vector>
|
||
|
|
||
|
class AnalysisJson
|
||
|
{
|
||
|
public:
|
||
|
struct json_node{
|
||
|
QString title;
|
||
|
QString name;
|
||
|
bool is_man;
|
||
|
std::int32_t err_level;
|
||
|
};
|
||
|
|
||
|
struct json_global{
|
||
|
std::int32_t vid_org;
|
||
|
std::int32_t pid_org;
|
||
|
std::int32_t vid_to;
|
||
|
std::int32_t pid_to;
|
||
|
};
|
||
|
|
||
|
AnalysisJson() = delete ;
|
||
|
AnalysisJson(QString path);
|
||
|
std::vector<json_node> GetNode();
|
||
|
json_global GetGlobal();
|
||
|
bool savejson(QString path,std::vector<json_node> json);
|
||
|
bool savejson(QString path, QJsonDocument doc);
|
||
|
|
||
|
private:
|
||
|
QJsonDocument m_json;
|
||
|
};
|
||
|
|
||
|
#endif // ANALYSISJSON_H
|