From 75294754b7a171a519b42251f1095c4ca2d1d773 Mon Sep 17 00:00:00 2001 From: lethosor Date: Sun, 19 May 2024 02:09:01 -0400 Subject: [PATCH] Support stl-array --- StructFields.pm | 6 ++++++ data-definition.xsd | 19 ++++++++++++++++--- lower-1.xslt | 2 +- 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/StructFields.pm b/StructFields.pm index 2516088e9..c7f2fb62d 100644 --- a/StructFields.pm +++ b/StructFields.pm @@ -148,6 +148,12 @@ my %custom_container_handlers = ( header_ref("vector"); return "std::vector"; }, + 'stl-array' => sub { + my $item = get_container_item_type($_, -void => 'void*'); + my $count = get_container_count($_); + header_ref("array"); + return "std::array<$item, $count>"; + }, 'stl-map' => sub { # TODO: implement get_container_key_type? my $key = 'void*'; diff --git a/data-definition.xsd b/data-definition.xsd index 21cbac88e..a327619da 100644 --- a/data-definition.xsd +++ b/data-definition.xsd @@ -219,6 +219,7 @@ + @@ -329,6 +330,14 @@ + + + + + + + + @@ -388,6 +397,12 @@ + + + + + + @@ -458,9 +473,7 @@ - - - + diff --git a/lower-1.xslt b/lower-1.xslt index 3a0a2a40f..2d16b745d 100644 --- a/lower-1.xslt +++ b/lower-1.xslt @@ -339,7 +339,7 @@ Error: field corresponds to an enum value of - +