YCLIMP
Yandex Command Line Interface Music Player
Loading...
Searching...
No Matches
XmlParser.hpp
1#pragma once
2
3#include "Primitives.hpp"
4#include "rapidxml.hpp"
5#include "rapidxml_utils.hpp"
6
7#include <string>
8#include <unordered_map>
9#include <unordered_set>
10
11using namespace rapidxml;
12
13using BindingMap = std::unordered_map<EEventKey, std::string>;
14
24class XmlParser
25{
26public:
27 XmlParser();
28
29 void LoadBindings(const std::string& SW_Name, BindingMap& globalBindings,
30 BindingMap& localBindingds);
31
32private:
33 void LoadKeyToEnumTable();
34 EEventKey GetEventKey(const std::string& keyName);
35
36private:
38 std::unordered_map<std::string, EEventKey> mKeyNameToEnum;
39 std::unordered_set<EEventKey> mGlobalHotkeyExist;
40};
void LoadBindings(const std::string &SW_Name, BindingMap &globalBindings, BindingMap &localBindingds)
Load bindings(local & global). bindings - table with real key id <-> action name. Uses mKeyNameToEnum...
Definition XmlParser.cpp:62