Files
o3de/Tools/SerializeContextAnalyzer/ConfluenceWiki_SerializeContext.jinja
T
Steve Pham 38261d0800 Shorten copyright headers by splitting into 2 lines (#2213)
* Updated all copyright headers to split the longer original copyright line into 2 shorter lines

Signed-off-by: Steve Pham <spham@amazon.com>
2021-07-16 15:25:48 -07:00

60 lines
1.9 KiB
Django/Jinja

{####
# Copyright (c) Contributors to the Open 3D Engine Project.
# For complete copyright and license terms please see the LICENSE at the root of this distribution.
#
# SPDX-License-Identifier: Apache-2.0 OR MIT
#
####-#}
{% import 'ConfluenceWiki_Utilities.jinja' as Utils -%}
{% macro WriteClass(uuid, class)%}
{# Header #}
h1. {{ Utils.Sanitize(class.Name) }} {anchor:{{ Utils.ClearBraces(uuid) }}}
{{Utils.Sanitize(class.Description)}}
_Id_: {{ Utils.Sanitize(class.Id) }}
_Uuid_: {{ Utils.Sanitize(uuid) }}
{# Bases #}
{% if class.Bases is defined %}
_Bases_:
{% for base in class.Bases %}
* {{ Utils.Link(SerializeContext, Config, Utils.Sanitize(base.Type), base.Uuid) }}
{% endfor %}
{% endif -%}
{# Generics #}
{% if class.Generics is defined %}
_Generics_:
{% for generic in class.Generics %}
* {{ Utils.Link(SerializeContext, Config, Utils.Sanitize(generic.Type), generic.SpecializedUuid) }}
{% endfor %}
{% endif %}
{# Fields #}
{% if class.Fields is defined %}
||Name||Type||Description||
{% for field in class.Fields %}
|{{ Utils.Sanitize(field.Name) }}|{{ Utils.Link(SerializeContext, Config, Utils.Sanitize(field.Type), field.Uuid) }}|{{Utils.Sanitize(field.Description)}} |
{% endfor %}
{% endif -%}
----
{% endmacro -%}
{expand:Table of contents}
{toc}
{expand}
{info}
This document is automatically generated using the template '{{ self._TemplateReference__context.name }}'
{info}
{% for uuid, class in SerializeContext.items()|sort(attribute='1.Name') %}
{% if Config.Filter is defined %}
{% if class.Name.startswith(Config.Filter|lower) or class.Name.startswith(Config.Filter|upper)%}
{{- WriteClass(uuid, class) }}
{% endif %}
{% else %}
{{- WriteClass(uuid, class) }}
{% endif %}
{% endfor %}