(fname_h, fname_cpp, fname_exp, mod_name, lib_dic)
| 257 | |
| 258 | |
| 259 | def WriteSourceFiles(fname_h, fname_cpp, fname_exp, mod_name, lib_dic): |
| 260 | with open(fname_h, 'w') as dst_h, open(fname_cpp, 'w') as dst_cpp, open(fname_exp, 'w') as dst_exp: |
| 261 | |
| 262 | print('write source file {} {} {}'.format(os.path.basename(fname_h), os.path.basename(fname_cpp), os.path.basename(fname_exp))) |
| 263 | |
| 264 | WriteHeadComment(dst_h, mod_name, lib_dic) |
| 265 | dst_h.write('\n') |
| 266 | WritePragmaOnce(dst_h) |
| 267 | dst_h.write('\n') |
| 268 | WriteInclude(dst_h, 'sce_module_common.h') |
| 269 | dst_h.write('\n\n') |
| 270 | WriteExpTabExtern(dst_h, mod_name) |
| 271 | dst_h.write('\n\n') |
| 272 | # WriteModuleFuncDecl(dst_h) |
| 273 | # dst_h.write('\n\n') |
| 274 | WriteNote(dst_h) |
| 275 | dst_h.write('\n\n\n') |
| 276 | |
| 277 | WriteInclude(dst_cpp, os.path.basename(fname_h)) |
| 278 | dst_cpp.write('\n\n') |
| 279 | WriteNote(dst_cpp) |
| 280 | dst_cpp.write('\n\n\n') |
| 281 | |
| 282 | for lib_name in lib_dic: |
| 283 | func_list = lib_dic[lib_name] |
| 284 | |
| 285 | WriteLibComment(dst_h, lib_name) |
| 286 | dst_h.write('\n') |
| 287 | WriteDeclaration(dst_h, func_list) |
| 288 | dst_h.write('\n\n') |
| 289 | |
| 290 | WriteLibComment(dst_cpp, lib_name) |
| 291 | dst_cpp.write('\n') |
| 292 | WriteDefination(dst_cpp, func_list) |
| 293 | dst_cpp.write('\n\n') |
| 294 | |
| 295 | # WriteModuleFuncImpl(dst_cpp) |
| 296 | |
| 297 | WriteInclude(dst_exp, os.path.basename(fname_h)) |
| 298 | dst_exp.write('\n\n') |
| 299 | WriteNote(dst_exp) |
| 300 | dst_exp.write('\n\n') |
| 301 | WriteExpTabDefination(dst_exp, mod_name, lib_dic) |
| 302 | |
| 303 | |
| 304 |
no test coverage detected