change_code/src/metadataupdate/metadataprocessor.h

55 lines
1.3 KiB
C++

#ifndef METADATAPROCESSOR_H
#define METADATAPROCESSOR_H
#include <QObject>
#include <QString>
#include <QMap>
#include <QJsonDocument>
#include <QJsonObject>
struct InterfaceInfo;
class MetadataProcessor : public QObject
{
Q_OBJECT
public:
explicit MetadataProcessor(QObject *parent = nullptr);
bool processUf2Interfaces(const QString& basePath);
bool processUft3Interfaces(const QString& basePath);
bool processUf2StdFields();
bool processUf2DataType();
bool processUf2ErrNumber();
bool processUft3StdFields();
bool processUft3DataType();
bool processUft3Table();
QString getBasePath() const;
void setBasePath(const QString& path);
public:
void initConfig(const QString& basePath);
private:
bool isValidUtf8(const QByteArray& data);
bool writeJson(const QString& filePath, const QJsonObject& jsonObject);
QJsonObject readJson(const QString& filePath);
QJsonObject interfaceInfoToUFT3Json(const InterfaceInfo& info);
QString m_basePath;
QString m_uf2touft3Path;
QString m_uf20Path;
QString m_ufAcct20Path;
QString m_uftDbSettPath;
QString m_uft30PubPath;
QString m_uft30CbptransPath;
QString m_uft30Path;
QString m_supportUftdbSett;
QString m_moduleGenerationCheck;
};
#endif // METADATAPROCESSOR_H