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

Function dump_pointer_array

layersvt/api_dump.h:1516–1538  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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,
1517 const char *element_type, int indents, DumpElement dump_element) {
1518 if (array == NULL || len == 0) {
1519 dump_nullptr<Format>(settings, type_string, name, indents);
1520 return;
1521 }
1522 dump_array_start<Format>(array, len, settings, type_string, name, indents);
1523 for (size_t i = 0; i < len; ++i) {
1524 std::stringstream stream;
1525 if constexpr (Format == ApiDumpFormat::Text || Format == ApiDumpFormat::Html) {
1526 stream << name;
1527 }
1528 stream << "[" << i << "]";
1529 std::string indexName = stream.str();
1530 dump_element(array[i], settings, element_type, indexName.c_str(), indents + (Format == ApiDumpFormat::Json ? 2 : 1),
1531 array + i);
1532 if constexpr (Format == ApiDumpFormat::Json) {
1533 if (i < len - 1) settings.stream() << ',';
1534 settings.stream() << "\n";
1535 }
1536 }
1537 dump_array_end<Format>(array, len, settings, indents);
1538}
1539
1540template <ApiDumpFormat Format, typename T, typename DumpElement>
1541void dump_double_pointer_array(const T *const *array, size_t len, const ApiDumpSettings &settings, const char *type_string,

Callers

nothing calls this directly

Calls 1

strMethod · 0.80

Tested by

no test coverage detected