adds std:: to <iosfwd> typedefs
BUG=#392
REF_BUG=
REF_CL=144227940
REF_TIME=2017-01-11T14:16:03-05:00
REF_TIME_RAW=1484162163 -0500
Behzad Nouri
7 years ago
195 | 195 | pb.set_compressed_lsize(kCompressedLSize); |
196 | 196 | pb.set_compressed_rsize(kCompressedRSize); |
197 | 197 | mozc::OutputFileStream ofs(output_size_info.c_str(), |
198 | ios_base::out | ios_base::binary); | |
198 | std::ios_base::out | std::ios_base::binary); | |
199 | 199 | CHECK(ofs); |
200 | 200 | CHECK(pb.SerializeToOstream(&ofs)); |
201 | 201 | ofs.close(); |
202 | 202 | } |
203 | 203 | { |
204 | 204 | mozc::OutputFileStream ofs(output_ltable.c_str(), |
205 | ios_base::out | ios_base::binary); | |
205 | std::ios_base::out | std::ios_base::binary); | |
206 | 206 | CHECK(ofs); |
207 | 207 | ltable.Output(&ofs); |
208 | 208 | ofs.close(); |
209 | 209 | } |
210 | 210 | { |
211 | 211 | mozc::OutputFileStream ofs(output_rtable.c_str(), |
212 | ios_base::out | ios_base::binary); | |
212 | std::ios_base::out | std::ios_base::binary); | |
213 | 213 | CHECK(ofs); |
214 | 214 | rtable.Output(&ofs); |
215 | 215 | ofs.close(); |
216 | 216 | } |
217 | 217 | { |
218 | 218 | mozc::OutputFileStream ofs(output_bitarray.c_str(), |
219 | ios_base::out | ios_base::binary); | |
219 | std::ios_base::out | std::ios_base::binary); | |
220 | 220 | CHECK(ofs); |
221 | 221 | ofs.write(barray.array(), barray.array_size()); |
222 | 222 | ofs.close(); |
29 | 29 | |
30 | 30 | MAJOR=2 |
31 | 31 | MINOR=20 |
32 | BUILD=2682 | |
32 | BUILD=2683 | |
33 | 33 | REVISION=102 |
34 | 34 | # This version represents the version of Mozc IME engine (converter, predictor, |
35 | 35 | # etc.). This version info is included both in the Mozc server and in the Mozc |
125 | 125 | std::vector<DictionaryFileSection> sections; |
126 | 126 | { |
127 | 127 | OutputFileStream ofs; |
128 | ofs.open(test_file_.c_str(), ios_base::out | ios_base::binary); | |
128 | ofs.open(test_file_.c_str(), std::ios_base::out | std::ios_base::binary); | |
129 | 129 | codec->WriteSections(sections, &ofs); |
130 | 130 | } |
131 | 131 | { |
132 | 132 | EXPECT_TRUE(FileUtil::FileExists(test_file_)); |
133 | 133 | InputFileStream ifs; |
134 | ifs.open(test_file_.c_str(), ios_base::in | ios_base::binary); | |
134 | ifs.open(test_file_.c_str(), std::ios_base::in | std::ios_base::binary); | |
135 | 135 | ifs.seekg(0, std::ios::end); |
136 | 136 | const int len = ifs.tellg(); |
137 | 137 | ifs.seekg(0, std::ios::beg); |
163 | 163 | AddSection(codec, "Section 1", value1.data(), value1.size(), |
164 | 164 | &write_sections); |
165 | 165 | OutputFileStream ofs; |
166 | ofs.open(test_file_.c_str(), ios_base::out | ios_base::binary); | |
166 | ofs.open(test_file_.c_str(), std::ios_base::out | std::ios_base::binary); | |
167 | 167 | codec->WriteSections(write_sections, &ofs); |
168 | 168 | } |
169 | 169 | char buf[1024] = {}; // sections will reference this buffer. |
171 | 171 | { |
172 | 172 | EXPECT_TRUE(FileUtil::FileExists(test_file_)); |
173 | 173 | InputFileStream ifs; |
174 | ifs.open(test_file_.c_str(), ios_base::in | ios_base::binary); | |
174 | ifs.open(test_file_.c_str(), std::ios_base::in | std::ios_base::binary); | |
175 | 175 | ifs.read(buf, 1024); |
176 | 176 | EXPECT_TRUE(codec->ReadSections(buf, 1024, §ions)); |
177 | 177 | } |
200 | 200 | AddSection(codec, "Section 1", value1.data(), value1.size(), |
201 | 201 | &write_sections); |
202 | 202 | OutputFileStream ofs; |
203 | ofs.open(test_file_.c_str(), ios_base::out | ios_base::binary); | |
203 | ofs.open(test_file_.c_str(), std::ios_base::out | std::ios_base::binary); | |
204 | 204 | codec->WriteSections(write_sections, &ofs); |
205 | 205 | } |
206 | 206 | char buf[1024] = {}; // sections will reference this buffer. |
208 | 208 | { |
209 | 209 | EXPECT_TRUE(FileUtil::FileExists(test_file_)); |
210 | 210 | InputFileStream ifs; |
211 | ifs.open(test_file_.c_str(), ios_base::in | ios_base::binary); | |
211 | ifs.open(test_file_.c_str(), std::ios_base::in | std::ios_base::binary); | |
212 | 212 | ifs.read(buf, 1024); |
213 | 213 | EXPECT_TRUE(codec->ReadSections(buf, 1024, §ions)); |
214 | 214 | } |
292 | 292 | // Output base conjugation suffix data. |
293 | 293 | { |
294 | 294 | OutputFileStream ostream(FLAGS_output_base_conjugation_suffix.c_str(), |
295 | ios_base::out | ios_base::binary); | |
295 | std::ios_base::out | std::ios_base::binary); | |
296 | 296 | for (const auto &conj : conjugation_list) { |
297 | 297 | const uint32 key_suffix_index = |
298 | 298 | Lookup(string_index, baseform_map[conj].key_suffix); |
307 | 307 | std::vector<int> conjugation_index(conjugation_list.size() + 1); |
308 | 308 | { |
309 | 309 | OutputFileStream ostream(FLAGS_output_conjugation_suffix.c_str(), |
310 | ios_base::out | ios_base::binary); | |
310 | std::ios_base::out | std::ios_base::binary); | |
311 | 311 | int out_count = 0; |
312 | 312 | for (size_t i = 0; i < conjugation_list.size(); ++i) { |
313 | 313 | const std::vector<ConjugationType> &conjugations = |
340 | 340 | // Output conjugation suffix data index. |
341 | 341 | { |
342 | 342 | OutputFileStream ostream(FLAGS_output_conjugation_index.c_str(), |
343 | ios_base::out | ios_base::binary); | |
343 | std::ios_base::out | std::ios_base::binary); | |
344 | 344 | ostream.write(reinterpret_cast<const char *>(conjugation_index.data()), |
345 | 345 | 4 * conjugation_index.size()); |
346 | 346 | } |
348 | 348 | // Output usage data. |
349 | 349 | { |
350 | 350 | OutputFileStream ostream(FLAGS_output_usage_item_array.c_str(), |
351 | ios_base::out | ios_base::binary); | |
351 | std::ios_base::out | std::ios_base::binary); | |
352 | 352 | int32 usage_id = 0; |
353 | 353 | for (const UsageItem &item : usage_entries) { |
354 | 354 | const uint32 key_index = Lookup(string_index, item.key); |