blob: 9fad501fc8ca78dd2ba61e11683195e82b9690a1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#pragma once
class apiset {
std::unordered_map<std::string, std::string> m_apimap;
public:
apiset();
bool find(std::string &mod) {
auto it = std::find_if(m_apimap.begin(), m_apimap.end(), [&](const std::pair<std::string, std::string>& pair) {
return mod.find(pair.first) != std::string::npos;
});
if (it != m_apimap.end()) {
mod = it->second;
return true;
}
return false;
}
auto &map() { return m_apimap; }
};
extern apiset g_apiset;
|