1
0
Files
libcmo21/Ballance/BMapInspector/Rule.hpp

40 lines
746 B
C++
Raw Normal View History

2026-01-30 20:23:39 +08:00
#pragma once
2026-01-30 20:40:21 +08:00
#include "Utils.hpp"
2026-01-31 23:16:50 +08:00
#include "Reporter.hpp"
2026-02-02 14:17:31 +08:00
#include "Map.hpp"
2026-01-30 20:40:21 +08:00
#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>
2026-02-02 14:17:31 +08:00
namespace BMapInspector::Rule {
2026-01-30 20:23:39 +08:00
class IRule {
public:
IRule();
virtual ~IRule();
YYCC_DELETE_COPY_MOVE(IRule)
public:
virtual std::u8string_view GetRuleName() const = 0;
2026-02-02 14:17:31 +08:00
virtual void Check(Reporter::Reporter& reporter, Map::Level& ctx) const = 0;
2026-01-30 20:23:39 +08:00
};
2026-02-02 14:17:31 +08:00
class Ruleset {
2026-01-30 20:23:39 +08:00
public:
2026-02-02 14:17:31 +08:00
Ruleset();
~Ruleset();
YYCC_DELETE_COPY_MOVE(Ruleset)
2026-01-30 20:23:39 +08:00
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