Lines Matching refs:out_file
74 std::ofstream out_file; in generate_cpp_headers_one_file() local
75 out_file.open(gen_file); in generate_cpp_headers_one_file()
76 if (!out_file.is_open()) { in generate_cpp_headers_one_file()
81 out_file << in generate_cpp_headers_one_file()
111 ((CustomFieldDef*)c.second)->GenInclude(out_file); in generate_cpp_headers_one_file()
114 out_file << "\n\n"; in generate_cpp_headers_one_file()
118 generate_namespace_open(namespace_list, out_file); in generate_cpp_headers_one_file()
119 out_file << "\n\n"; in generate_cpp_headers_one_file()
124 ((CustomFieldDef*)c.second)->GenUsing(out_file); in generate_cpp_headers_one_file()
127 out_file << in generate_cpp_headers_one_file()
152 gen.GenDefinition(out_file); in generate_cpp_headers_one_file()
153 out_file << "\n\n"; in generate_cpp_headers_one_file()
160 gen.GenLogging(out_file); in generate_cpp_headers_one_file()
161 out_file << "\n\n"; in generate_cpp_headers_one_file()
167 checksum_def->GenChecksumCheck(out_file); in generate_cpp_headers_one_file()
170 out_file << "\n/* Done ChecksumChecks */\n"; in generate_cpp_headers_one_file()
176 custom_field_def->GenCustomFieldCheck(out_file, decls.is_little_endian); in generate_cpp_headers_one_file()
179 custom_field_def->GenFixedSizeCustomFieldCheck(out_file); in generate_cpp_headers_one_file()
183 out_file << "\n"; in generate_cpp_headers_one_file()
188 struct_def->GenDefinition(out_file); in generate_cpp_headers_one_file()
189 out_file << "\n"; in generate_cpp_headers_one_file()
195 spg.Generate(out_file); in generate_cpp_headers_one_file()
196 out_file << "\n\n"; in generate_cpp_headers_one_file()
200 packet_def.second->GenParserDefinition(out_file); in generate_cpp_headers_one_file()
201 out_file << "\n\n"; in generate_cpp_headers_one_file()
205 packet_def.second->GenBuilderDefinition(out_file); in generate_cpp_headers_one_file()
206 out_file << "\n\n"; in generate_cpp_headers_one_file()
210 out_file << "class Checker { public: static bool IsCommandStatusOpcode(OpCode op_code) {"; in generate_cpp_headers_one_file()
211 out_file << "switch (op_code) {"; in generate_cpp_headers_one_file()
222 out_file << "case " << std::get<std::string>(constraint->second) << ":"; in generate_cpp_headers_one_file()
240 out_file << "return true; default: return false; }}};"; in generate_cpp_headers_one_file()
243 generate_namespace_close(namespace_list, out_file); in generate_cpp_headers_one_file()
245 out_file.close(); in generate_cpp_headers_one_file()
280 auto& out_file = out_file_shards[i]; in generate_pybind11_sources_one_file() local
281 out_file.open(filename); in generate_pybind11_sources_one_file()
282 if (!out_file.is_open()) { in generate_pybind11_sources_one_file()
286 out_file << "#include <pybind11/pybind11.h>\n"; in generate_pybind11_sources_one_file()
287 out_file << "#include <pybind11/stl.h>\n"; in generate_pybind11_sources_one_file()
288 out_file << "\n\n"; in generate_pybind11_sources_one_file()
289 out_file << "#include " << gen_relative_header << "\n"; in generate_pybind11_sources_one_file()
290 out_file << "\n\n"; in generate_pybind11_sources_one_file()
291 out_file << "#include \"packet/raw_builder.h\"\n"; in generate_pybind11_sources_one_file()
292 out_file << "\n\n"; in generate_pybind11_sources_one_file()
297 custom_def->GenPyBind11Include(out_file); in generate_pybind11_sources_one_file()
301 out_file << "\n\n"; in generate_pybind11_sources_one_file()
303 generate_namespace_open(namespace_list, out_file); in generate_pybind11_sources_one_file()
304 out_file << "\n\n"; in generate_pybind11_sources_one_file()
310 custom_def->GenUsing(out_file); in generate_pybind11_sources_one_file()
313 out_file << "\n\n"; in generate_pybind11_sources_one_file()
315 out_file << "using ::bluetooth::packet::BasePacketBuilder;"; in generate_pybind11_sources_one_file()
316 out_file << "using ::bluetooth::packet::BitInserter;"; in generate_pybind11_sources_one_file()
317 out_file << "using ::bluetooth::packet::CustomTypeChecker;"; in generate_pybind11_sources_one_file()
318 out_file << "using ::bluetooth::packet::Iterator;"; in generate_pybind11_sources_one_file()
319 out_file << "using ::bluetooth::packet::kLittleEndian;"; in generate_pybind11_sources_one_file()
320 out_file << "using ::bluetooth::packet::PacketBuilder;"; in generate_pybind11_sources_one_file()
321 out_file << "using ::bluetooth::packet::BaseStruct;"; in generate_pybind11_sources_one_file()
322 out_file << "using ::bluetooth::packet::PacketStruct;"; in generate_pybind11_sources_one_file()
323 out_file << "using ::bluetooth::packet::PacketView;"; in generate_pybind11_sources_one_file()
324 out_file << "using ::bluetooth::packet::RawBuilder;"; in generate_pybind11_sources_one_file()
325 out_file << "using ::bluetooth::packet::parser::ChecksumTypeChecker;"; in generate_pybind11_sources_one_file()
326 out_file << "\n\n"; in generate_pybind11_sources_one_file()
328 out_file << "namespace py = pybind11;\n\n"; in generate_pybind11_sources_one_file()
330 …out_file << "void define_" << input_filename << "_submodule_shard_" << std::to_string(i) << "(py::… in generate_pybind11_sources_one_file()
349 auto& out_file = get_out_file(symbol_count, symbol_total, &out_file_shards); in generate_pybind11_sources_one_file() local
350 gen.GenDefinitionPybind11(out_file); in generate_pybind11_sources_one_file()
351 out_file << "\n\n"; in generate_pybind11_sources_one_file()
359 auto& out_file = get_out_file(symbol_count, symbol_total, &out_file_shards); in generate_pybind11_sources_one_file() local
360 struct_def->GenDefinitionPybind11(out_file); in generate_pybind11_sources_one_file()
361 out_file << "\n"; in generate_pybind11_sources_one_file()
367 auto& out_file = get_out_file(symbol_count, symbol_total, &out_file_shards); in generate_pybind11_sources_one_file() local
368 packet_def.second->GenParserDefinitionPybind11(out_file); in generate_pybind11_sources_one_file()
369 out_file << "\n\n"; in generate_pybind11_sources_one_file()
374 auto& out_file = get_out_file(symbol_count, symbol_total, &out_file_shards); in generate_pybind11_sources_one_file() local
375 p.second->GenBuilderDefinitionPybind11(out_file); in generate_pybind11_sources_one_file()
376 out_file << "\n\n"; in generate_pybind11_sources_one_file()
380 for (auto& out_file : out_file_shards) { in generate_pybind11_sources_one_file() local
381 out_file << "}\n\n"; in generate_pybind11_sources_one_file()
382 generate_namespace_close(namespace_list, out_file); in generate_pybind11_sources_one_file()