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

30 lines
810 B
C++
Raw Normal View History

2026-01-30 20:23:39 +08:00
#pragma once
#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 {
#define PRIuSIZET "zu"
2026-01-30 20:23:39 +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
enum class ReportLevel : std::uint32_t {
Error = 0,
Warning = 1,
Info = 2,
};
2026-01-30 20:23:39 +08:00
std::optional<ReportLevel> ParseReportLevel(const std::u8string_view& value);
2026-01-30 20:23:39 +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