2026-01-30 20:23:39 +08:00
|
|
|
#pragma once
|
2026-01-31 11:28:03 +08:00
|
|
|
#include <cstdint>
|
|
|
|
|
#include <optional>
|
2026-01-30 20:23:39 +08:00
|
|
|
#include <string_view>
|
2026-01-30 20:40:21 +08:00
|
|
|
|
2026-01-30 20:23:39 +08:00
|
|
|
namespace BMapInspector::Utils {
|
|
|
|
|
|
2026-01-31 11:28:03 +08:00
|
|
|
#define PRIuSIZET "zu"
|
2026-01-30 20:23:39 +08:00
|
|
|
|
2026-01-31 11:28:03 +08:00
|
|
|
#define BMAPINSP_NAME "Ballance Map Inspector"
|
|
|
|
|
#define BMAPINSP_DESC "The inspector for checking whether your Ballance custom map can be loaded without any issues."
|
2026-01-30 20:23:39 +08:00
|
|
|
|
2026-01-31 11:28:03 +08:00
|
|
|
enum class ReportLevel : std::uint32_t {
|
|
|
|
|
Error = 0,
|
|
|
|
|
Warning = 1,
|
|
|
|
|
Info = 2,
|
|
|
|
|
};
|
2026-01-30 20:23:39 +08:00
|
|
|
|
2026-01-31 11:28:03 +08:00
|
|
|
std::optional<ReportLevel> ParseReportLevel(const std::u8string_view& value);
|
2026-01-30 20:23:39 +08:00
|
|
|
|
2026-01-31 11:28:03 +08:00
|
|
|
/**
|
|
|
|
|
* @brief Check whether given report level can pass given filter.
|
|
|
|
|
* @param[in] check The level for checking whether it can pass filter.
|
|
|
|
|
* @param[in] filter The level of filter.
|
|
|
|
|
* @return True if is can pass, otherwise false.
|
|
|
|
|
*/
|
|
|
|
|
bool FilterReportLevel(ReportLevel check, ReportLevel filter);
|
2026-01-30 20:23:39 +08:00
|
|
|
|
|
|
|
|
} // namespace BMapInspector::Utils
|