2024-09-24 10:43:10 +00:00
|
|
|
|
#pragma once
|
|
|
|
|
#include "xast_parse.h"
|
|
|
|
|
#include <QHash>
|
|
|
|
|
|
|
|
|
|
namespace compare {
|
|
|
|
|
enum class Type {
|
|
|
|
|
UpstreamAlter,
|
|
|
|
|
FragmentAlter
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class Compare {
|
|
|
|
|
private:
|
|
|
|
|
QHash<QString, std::shared_ptr<xast_parse::StoryDefine>> _graph_base;
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
explicit Compare(const QHash<QString, std::shared_ptr<xast_parse::StoryDefine>>& graph);
|
|
|
|
|
|
|
|
|
|
const QHash<QString, std::shared_ptr<xast_parse::StoryDefine>> &graphBind() const;
|
|
|
|
|
|
2025-02-02 14:30:47 +00:00
|
|
|
|
QList<std::shared_ptr<xast_parse::PointDefines>> changeCompare(Type type,
|
2024-09-24 10:43:10 +00:00
|
|
|
|
const QHash<QString, std::shared_ptr<xast_parse::StoryDefine>>& g_old) const;
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
/*
|
|
|
|
|
* @brief <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݱȽ<EFBFBD>
|
|
|
|
|
* @param a <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
* @param b <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
* @return true-<EFBFBD>б<EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
*/
|
2025-02-02 14:30:47 +00:00
|
|
|
|
bool fragment_check(std::shared_ptr<xast_parse::PointDefines> a, std::shared_ptr<xast_parse::PointDefines> b) const;
|
2024-09-24 10:43:10 +00:00
|
|
|
|
/*
|
|
|
|
|
* @brief <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݱȽ<EFBFBD>
|
|
|
|
|
* @param a <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
* @param b <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
* @return true-<EFBFBD>б<EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
*/
|
|
|
|
|
bool upstream_check(std::shared_ptr<xast_parse::IElementSlice> a, std::shared_ptr<xast_parse::IElementSlice> b) const;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|