blob: 29e47b0e0ad989ecbf132f42bb7f98ff1eed9a8d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
#pragma once
#include <unordered_map>
#include "saxparser.h"
class ConfigParser
: public SAXParser
{
public:
ConfigParser();
void characterData(const std::string& data) override;
void startTag(const std::string& name, const attr_t& attr) override;
void endTag(const std::string& name) override;
std::string value(const std::string& name, const std::string& def = "");
private:
std::unordered_map<std::string, std::string> values;
std::string* str;
};
|