OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_COMMON_INI_PARSER_H_ | 5 #ifndef CHROME_COMMON_INI_PARSER_H_ |
6 #define CHROME_COMMON_INI_PARSER_H_ | 6 #define CHROME_COMMON_INI_PARSER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/macros.h" |
11 #include "base/values.h" | 11 #include "base/values.h" |
12 | 12 |
13 // Parses INI files in a string. Users should in inherit from this class. | 13 // Parses INI files in a string. Users should in inherit from this class. |
14 // This is a very basic INI parser with these characteristics: | 14 // This is a very basic INI parser with these characteristics: |
15 // - Ignores blank lines. | 15 // - Ignores blank lines. |
16 // - Ignores comment lines beginning with '#' or ';'. | 16 // - Ignores comment lines beginning with '#' or ';'. |
17 // - Duplicate key names in the same section will simply cause repeated calls | 17 // - Duplicate key names in the same section will simply cause repeated calls |
18 // to HandleTriplet with the same |section| and |key| parameters. | 18 // to HandleTriplet with the same |section| and |key| parameters. |
19 // - No escape characters supported. | 19 // - No escape characters supported. |
20 // - Global properties result in calls to HandleTriplet with an empty string in | 20 // - Global properties result in calls to HandleTriplet with an empty string in |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 void HandleTriplet(const std::string& section, | 55 void HandleTriplet(const std::string& section, |
56 const std::string& key, | 56 const std::string& key, |
57 const std::string& value) override; | 57 const std::string& value) override; |
58 | 58 |
59 base::DictionaryValue root_; | 59 base::DictionaryValue root_; |
60 | 60 |
61 DISALLOW_COPY_AND_ASSIGN(DictionaryValueINIParser); | 61 DISALLOW_COPY_AND_ASSIGN(DictionaryValueINIParser); |
62 }; | 62 }; |
63 | 63 |
64 #endif // CHROME_COMMON_INI_PARSER_H_ | 64 #endif // CHROME_COMMON_INI_PARSER_H_ |
OLD | NEW |