| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_TOOLS_CONVERT_DICT_AFF_READER_H__ | 5 #ifndef CHROME_TOOLS_CONVERT_DICT_AFF_READER_H__ |
| 6 #define CHROME_TOOLS_CONVERT_DICT_AFF_READER_H__ | 6 #define CHROME_TOOLS_CONVERT_DICT_AFF_READER_H__ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <stdio.h> | 9 #include <stdio.h> |
| 10 #include <string> | 10 #include <string> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 namespace base { |
| 13 class FilePath; | 14 class FilePath; |
| 15 } |
| 14 | 16 |
| 15 namespace convert_dict { | 17 namespace convert_dict { |
| 16 | 18 |
| 17 class AffReader { | 19 class AffReader { |
| 18 public: | 20 public: |
| 19 explicit AffReader(const FilePath& path); | 21 explicit AffReader(const base::FilePath& path); |
| 20 ~AffReader(); | 22 ~AffReader(); |
| 21 | 23 |
| 22 bool Read(); | 24 bool Read(); |
| 23 | 25 |
| 24 // Returns whether this file uses indexed affixes, or, on false, whether the | 26 // Returns whether this file uses indexed affixes, or, on false, whether the |
| 25 // rule string will be specified literally in the .dic file. This must be | 27 // rule string will be specified literally in the .dic file. This must be |
| 26 // called after Read(). | 28 // called after Read(). |
| 27 bool has_indexed_affixes() const { return has_indexed_affixes_; } | 29 bool has_indexed_affixes() const { return has_indexed_affixes_; } |
| 28 | 30 |
| 29 // Returns a string representing the encoding of the dictionary. This will | 31 // Returns a string representing the encoding of the dictionary. This will |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 // is the replacment. | 101 // is the replacment. |
| 100 std::vector< std::pair<std::string, std::string> > replacements_; | 102 std::vector< std::pair<std::string, std::string> > replacements_; |
| 101 | 103 |
| 102 // All other commands. | 104 // All other commands. |
| 103 std::vector<std::string> other_commands_; | 105 std::vector<std::string> other_commands_; |
| 104 }; | 106 }; |
| 105 | 107 |
| 106 } // namespace convert_dict | 108 } // namespace convert_dict |
| 107 | 109 |
| 108 #endif // CHROME_TOOLS_CONVERT_DICT_AFF_READER_H__ | 110 #endif // CHROME_TOOLS_CONVERT_DICT_AFF_READER_H__ |
| OLD | NEW |