Warning, /pim/libkgapi/tools/schema_generator/templates/macros/dependencies.j2 is written in an unsupported language. File is not indexed.

0001 {#
0002 SPDX-FileCopyrightText: 2021 Daniel Vrátil <dvratil@kde.org>
0003 
0004 SPDX-License-Identifier: LGPL-2.1-only
0005 SPDX-License-Identifier: LGPL-3.0-only
0006 SPDX-License-Identifier: LicenseRef-KDE-Accepted-LGPL
0007 #}
0008 
0009 {% macro render_includes(dependencies, builtin, qt, refs) %}
0010 {%- for dep in dependencies -%}
0011 {%- if (dep.is_builtin and builtin) or (dep.is_qt_type and qt) %}
0012 #include <{{ dep.include_name }}>
0013 {%- elif dep.is_ref and refs %}
0014 #include "{{ dep.name | lower }}.h"
0015 {%- endif %}
0016 {%- endfor -%}
0017 {% endmacro %}
0018 
0019 {% macro render_forward_declarations(dependencies) %}
0020 {%- for dep in dependencies %}
0021 {%- if dep.is_ref %}
0022 class {{ dep.full_name }};
0023 {%- endif %}
0024 {%- endfor -%}
0025 {% endmacro %}
0026 
0027 {% macro render_enums_declarations(enums) %}
0028     {%- for enum_type in enums %}
0029     enum class {{ enum_type.name }} {
0030         {%- for value in enum_type.values %}
0031         {{ value.name }}, ///< {{ value.description }}
0032         {%- endfor %}
0033     };
0034     {%- endfor %}
0035 {% endmacro %}