MCPcopy Create free account
hub / github.com/LunarG/VulkanTools / dump_single_array

Function dump_single_array

layersvt/api_dump.h:1492–1513  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1490
1491template <ApiDumpFormat Format, size_t N, typename T, typename DumpElement>
1492void dump_single_array(const T (&array)[N], size_t len, const ApiDumpSettings &settings, const char *type_string, const char *name,
1493 const char *element_type, int indents, DumpElement dump_element) {
1494 if (len == 0) {
1495 return;
1496 }
1497 dump_array_start<Format>(array, len, settings, type_string, name, indents);
1498 for (size_t i = 0; i < len; ++i) {
1499 std::stringstream stream;
1500 if constexpr (Format == ApiDumpFormat::Text || Format == ApiDumpFormat::Html) {
1501 stream << name;
1502 }
1503 stream << "[" << i << "]";
1504 std::string indexName = stream.str();
1505 dump_element(array[i], settings, element_type, indexName.c_str(), indents + (Format == ApiDumpFormat::Json ? 2 : 1),
1506 nullptr);
1507 if constexpr (Format == ApiDumpFormat::Json) {
1508 if (i < len - 1) settings.stream() << ',';
1509 settings.stream() << "\n";
1510 }
1511 }
1512 dump_array_end<Format>(array, len, settings, indents);
1513}
1514
1515template <ApiDumpFormat Format, typename T, typename DumpElement>
1516void dump_pointer_array(const T *array, size_t len, const ApiDumpSettings &settings, const char *type_string, const char *name,

Callers

nothing calls this directly

Calls 1

strMethod · 0.80

Tested by

no test coverage detected