Use Jinja 2 templates to generate the `metadata` file
[deliverable/barectf.git] / barectf / templates / metadata-struct-ft.j2
CommitLineData
de49021e
PP
1struct {
2{% for name, member in ft.members.items() %}
3{#
4`chain` is a list of static array field types terminated with a
5non-array field type (the most nested).
6#}
7{% set chain = ft_chain(member.field_type) %}
8 {{ chain[-1] | ft_str | indent_tab }} {{ name }}
9 {%- for array_ft in chain[:-1] %}[{{ array_ft.length }}]{% endfor %};
10{% endfor %}
11} align({{ ft.minimum_alignment }})
This page took 0.023613 seconds and 4 git commands to generate.