| 1428 | |
| 1429 | template <ApiDumpFormat Format> |
| 1430 | void dump_array_start(const void *array, size_t len, const ApiDumpSettings &settings, const char *type_string, const char *name, |
| 1431 | int indents) { |
| 1432 | if constexpr (Format == ApiDumpFormat::Text) { |
| 1433 | dump_start<Format>(settings, OutputConstruct::pointer, type_string, name, indents, array); |
| 1434 | settings.stream() << "\n"; |
| 1435 | } else if constexpr (Format == ApiDumpFormat::Html) { |
| 1436 | dump_start<Format>(settings, OutputConstruct::api_struct, type_string, name, indents, array); |
| 1437 | } else if constexpr (Format == ApiDumpFormat::Json) { |
| 1438 | dump_json_start_object(settings, indents); |
| 1439 | dump_json_key_value(settings, indents + 1, "type", type_string); |
| 1440 | dump_separate_members<Format>(settings); |
| 1441 | dump_json_key_value(settings, indents + 1, "name", name); |
| 1442 | dump_separate_members<Format>(settings); |
| 1443 | dump_json_key_address(settings, indents + 1, array); |
| 1444 | if (len > 0 && array != NULL) { |
| 1445 | dump_separate_members<Format>(settings); |
| 1446 | dump_json_key_start_array(settings, indents + 1, "elements"); |
| 1447 | } else { |
| 1448 | settings.stream() << "\n"; |
| 1449 | } |
| 1450 | } |
| 1451 | } |
| 1452 | |
| 1453 | template <ApiDumpFormat Format> |
| 1454 | void dump_array_end(const void *array, size_t len, const ApiDumpSettings &settings, int indents) { |
nothing calls this directly
no test coverage detected