Files
MaaAssistantArknights/MeoAssistance/InfrastConfiger.h
2021-08-20 16:24:04 +08:00

38 lines
1.1 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#pragma once
#include <string>
#include <unordered_map>
#include <unordered_set>
#include "AsstDef.h"
namespace asst {
class InfrastConfiger
{
public:
~InfrastConfiger() = default;
static InfrastConfiger& get_instance() {
static InfrastConfiger unique_instance;
return unique_instance;
}
bool load(const std::string& filename);
std::unordered_set<std::string> m_all_opers_name; // 所有干员的名字
std::unordered_map<std::string, std::string> m_oper_name_feat; // 根据关键字需要特征检测干员名如果OCR识别到了key的内容但是却没有value的内容则进行特征检测进一步确认
std::unordered_set<std::string> m_oper_name_feat_whatever; // 无论如何都进行特征检测的干员名
std::unordered_map<std::string, std::vector<std::vector<OperInfrastInfo>>> m_infrast_combs; // 各个设施内的可能干员组合
private:
InfrastConfiger() = default;
InfrastConfiger(const InfrastConfiger& rhs) = default;
InfrastConfiger(InfrastConfiger&& rhs) noexcept = default;
InfrastConfiger& operator=(const InfrastConfiger& rhs) = default;
InfrastConfiger& operator=(InfrastConfiger&& rhs) noexcept = default;
bool _load(const std::string& filename);
};
}