equal
deleted
inserted
replaced
18 |
18 |
19 #include <string> |
19 #include <string> |
20 |
20 |
21 class INIContentHandler { |
21 class INIContentHandler { |
22 public: |
22 public: |
|
23 |
|
24 class Event { |
|
25 public: |
|
26 int64_t eventNumber = -1; |
|
27 int64_t lineNumber = -1; |
|
28 std::string comment; |
|
29 }; |
|
30 |
|
31 class SectionStartEvent : public Event { |
|
32 public: |
|
33 std::string name; |
|
34 }; |
|
35 |
|
36 class EntryEvent : public Event { |
|
37 public: |
|
38 std::string key; |
|
39 std::string subKey; |
|
40 std::string fullKey; |
|
41 std::string value; |
|
42 }; |
|
43 |
23 virtual ~INIContentHandler() = default; |
44 virtual ~INIContentHandler() = default; |
24 virtual void startDocument() = 0; |
45 virtual void startDocument() = 0; |
25 virtual void endDocument() = 0; |
46 virtual void endDocument() = 0; |
26 virtual void startSection(const std::string& name) = 0; |
47 virtual void startSection(const SectionStartEvent& event) = 0; |
27 virtual void endSection() = 0; |
48 virtual void endSection() = 0; |
28 virtual void entry(const std::string& key, const std::string& subkey, const std::string& value) = 0; |
49 virtual void entry(const EntryEvent& event) = 0; |
29 }; |
50 }; |