2026-01-30 20:23:39 +08:00
|
|
|
#pragma once
|
2026-01-30 20:40:21 +08:00
|
|
|
#include "Utils.hpp"
|
|
|
|
|
#include <VTAll.hpp>
|
2026-01-30 20:23:39 +08:00
|
|
|
#include <yycc.hpp>
|
|
|
|
|
#include <yycc/macro/class_copy_move.hpp>
|
|
|
|
|
#include <string>
|
|
|
|
|
#include <string_view>
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
|
|
namespace BMapInspector::Ruleset {
|
|
|
|
|
|
|
|
|
|
class IRule {
|
|
|
|
|
public:
|
|
|
|
|
IRule();
|
|
|
|
|
virtual ~IRule();
|
|
|
|
|
YYCC_DELETE_COPY_MOVE(IRule)
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
virtual std::u8string_view GetRuleName() const = 0;
|
2026-01-30 20:40:21 +08:00
|
|
|
virtual void Check(Utils::Reporter& reporter) const = 0;
|
2026-01-30 20:23:39 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class RuleCollection {
|
|
|
|
|
public:
|
|
|
|
|
RuleCollection();
|
|
|
|
|
~RuleCollection();
|
|
|
|
|
YYCC_DELETE_COPY_MOVE(RuleCollection)
|
|
|
|
|
|
|
|
|
|
public:
|
2026-01-30 20:40:21 +08:00
|
|
|
size_t GetRuleCount() const;
|
2026-01-30 20:23:39 +08:00
|
|
|
const std::vector<IRule *> &GetRules() const;
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
std::vector<IRule *> rules;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace BMapInspector::Ruleset
|