(options)
| 438 | |
| 439 | |
| 440 | def print_parse_envloader_options(options): |
| 441 | output_argloader.write("#ifdef ENVLOADER\n") |
| 442 | output_argloader.write("#undef ENVLOADER\n") |
| 443 | output_argloader.write("if (false) {}\n") |
| 444 | |
| 445 | for op_group, group_vals in options.items(): |
| 446 | for op_key, op_vals in group_vals.items(): |
| 447 | value_type = op_vals["Type"] |
| 448 | if (value_type == "strenum"): |
| 449 | output_argloader.write("else if (Key == \"FEX_{0}\") {{\n".format(op_key.upper())) |
| 450 | output_argloader.write("\tValue = FEXCore::Config::EnumParser<FEXCore::Config::{}ConfigPair>(FEXCore::Config::{}_EnumPairs, Value_View);\n".format(op_key, op_key)) |
| 451 | output_argloader.write("}\n") |
| 452 | |
| 453 | if ("ArgumentHandler" in op_vals): |
| 454 | conversion_func = "FEXCore::Config::Handler::{0}".format(op_vals["ArgumentHandler"]) |
| 455 | output_argloader.write("else if (Key == \"FEX_{0}\") {{\n".format(op_key.upper())) |
| 456 | output_argloader.write("\tValue = {0}(Value_View);\n".format(conversion_func)) |
| 457 | output_argloader.write("}\n") |
| 458 | output_argloader.write("#endif\n") |
| 459 | |
| 460 | def print_parse_jsonloader_options(options): |
| 461 | output_argloader.write("#ifdef JSONLOADER\n") |
no test coverage detected