ConfluenceWiki_SerializeContext.jinja 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. {####
  2. # Copyright (c) Contributors to the Open 3D Engine Project.
  3. # For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. #
  5. # SPDX-License-Identifier: Apache-2.0 OR MIT
  6. #
  7. ####-#}
  8. {% import 'ConfluenceWiki_Utilities.jinja' as Utils -%}
  9. {% macro WriteClass(uuid, class)%}
  10. {# Header #}
  11. h1. {{ Utils.Sanitize(class.Name) }} {anchor:{{ Utils.ClearBraces(uuid) }}}
  12. {{Utils.Sanitize(class.Description)}}
  13. _Id_: {{ Utils.Sanitize(class.Id) }}
  14. _Uuid_: {{ Utils.Sanitize(uuid) }}
  15. {# Bases #}
  16. {% if class.Bases is defined %}
  17. _Bases_:
  18. {% for base in class.Bases %}
  19. * {{ Utils.Link(SerializeContext, Config, Utils.Sanitize(base.Type), base.Uuid) }}
  20. {% endfor %}
  21. {% endif -%}
  22. {# Generics #}
  23. {% if class.Generics is defined %}
  24. _Generics_:
  25. {% for generic in class.Generics %}
  26. * {{ Utils.Link(SerializeContext, Config, Utils.Sanitize(generic.Type), generic.SpecializedUuid) }}
  27. {% endfor %}
  28. {% endif %}
  29. {# Fields #}
  30. {% if class.Fields is defined %}
  31. ||Name||Type||Description||
  32. {% for field in class.Fields %}
  33. |{{ Utils.Sanitize(field.Name) }}|{{ Utils.Link(SerializeContext, Config, Utils.Sanitize(field.Type), field.Uuid) }}|{{Utils.Sanitize(field.Description)}} |
  34. {% endfor %}
  35. {% endif -%}
  36. ----
  37. {% endmacro -%}
  38. {expand:Table of contents}
  39. {toc}
  40. {expand}
  41. {info}
  42. This document is automatically generated using the template '{{ self._TemplateReference__context.name }}'
  43. {info}
  44. {% for uuid, class in SerializeContext.items()|sort(attribute='1.Name') %}
  45. {% if Config.Filter is defined %}
  46. {% if class.Name.startswith(Config.Filter|lower) or class.Name.startswith(Config.Filter|upper)%}
  47. {{- WriteClass(uuid, class) }}
  48. {% endif %}
  49. {% else %}
  50. {{- WriteClass(uuid, class) }}
  51. {% endif %}
  52. {% endfor %}