update liquid

This commit is contained in:
ouczbs 2024-06-14 22:26:49 +08:00
parent 9df2624221
commit 961cb5cd97

View File

@ -1,18 +1,14 @@
{%- assign NewLine = newline_to_br -%} {%- assign NewLine = newline_to_br -%}
{{ Indent2 }}struct {{ Name }}_Static_{{MetaName}} { {{ Indent2 }}struct {{ Name }}_Static_{{MetaName}} {
{{ Indent2 }} consteval static auto __StaticFields() {
{{ Indent2 }} return std::make_tuple({% for field in FieldList %}{% if field.Type != 2 %}{% unless forloop.first %}, {% endunless %}&{{Name}}::{{field.Name}}{% endif %}{% endfor %});
{{ Indent2 }} };
{{ NewLine }}
{{ Indent2 }} consteval static auto __MakeStaticFields() { {{ Indent2 }} consteval static auto __MakeStaticFields() {
{{ Indent2 }} return std::array{ {{ Indent2 }} return std::array{
{{ NewLine }} {%- for field in FieldList -%} {{ NewLine }} {%- for field in FieldList -%}
{{ NewLine }} {%- if field.Type == 1 -%} {{ NewLine }} {%- if field.Type == 1 -%}
{{ Indent2 }} refl::StaticMethodField(&{{Name}}::{{field.Name}}, FName("{{field.Name}}"), {{field.Meta}}), {{ Indent2 }} refl::StaticMemberField(&{{Name}}::{{field.Name}}, FName("{{field.Name}}"), {{field.Meta}}),
{{ NewLine }} {%- elsif field.Type == 2 -%} {{ NewLine }} {%- elsif field.Type == 2 -%}
{{ Indent2 }} refl::StaticCtorField<{{field.Name}}>({{field.Meta}}), {{ Indent2 }} refl::StaticCtorField<{{field.Name}}>({{field.Meta}}),
{{ NewLine }} {%- else -%} {{ NewLine }} {%- else -%}
{{ Indent2 }} refl::StaticMemberField(&{{Name}}::{{field.Name}}, FName("{{field.Name}}"), {{field.Meta}}), {{ Indent2 }} refl::StaticMethodField(&{{Name}}::{{field.Name}}, FName("{{field.Name}}"), {{field.Meta}}),
{{ NewLine }} {%- endif -%} {{ NewLine }} {%- endif -%}
{{ NewLine }} {%- endfor -%} {{ NewLine }} {%- endfor -%}
{{ Indent2 }} }; {{ Indent2 }} };
@ -30,7 +26,7 @@
{{ Indent2 }}}; {{ Indent2 }}};
{{ NewLine }} {{ NewLine }}
{{ Indent2 }}struct {{ Name }}_{{MetaName}} : public refl::Meta { {{ Indent2 }}struct {{ Name }}_{{MetaName}} : public refl::Meta {
{{ Indent2 }} using MyUClass = refl::UClass_Meta<{{ Name }}_{{MetaName}}, {{ ParentName }}>; {{ Indent2 }} using MyUClass = refl::UClass_Meta<{{ Name }}, {{ ParentName }}>;
{{ Indent2 }} using MyStatic = {{ Name }}_Static_{{MetaName}}; {{ Indent2 }} using MyStatic = {{ Name }}_Static_{{MetaName}};
{{ NewLine }} {%-if IsMultyMeta -%} {{ NewLine }} {%-if IsMultyMeta -%}
{{ Indent2 }} using MyMetas = class {{Name}}_MulytMeta; {{ Indent2 }} using MyMetas = class {{Name}}_MulytMeta;
@ -41,11 +37,11 @@
{{ Indent2 }} return std::array{ {{ Indent2 }} return std::array{
{{ NewLine }} {%- for field in FieldList -%} {{ NewLine }} {%- for field in FieldList -%}
{{ NewLine }} {%- if field.Type == 1 -%} {{ NewLine }} {%- if field.Type == 1 -%}
{{ Indent2 }} MethodField(&{{Name}}::{{field.Name}}, FName("{{field.Name}}"), memory, {{field.Meta}}),
{{ NewLine }} {%- elsif field.Type == 2 -%}
{{ Indent2 }} CtorField<{{field.Name}}>({{field.Meta}}),
{{ NewLine }} {%- else -%}
{{ Indent2 }} MemberField(&{{Name}}::{{field.Name}}, FName("{{field.Name}}"), memory, {{field.Meta}}), {{ Indent2 }} MemberField(&{{Name}}::{{field.Name}}, FName("{{field.Name}}"), memory, {{field.Meta}}),
{{ NewLine }} {%- elsif field.Type == 2 -%}
{{ Indent2 }} CtorField<{{field.Name}}>(memory, {{field.Meta}}),
{{ NewLine }} {%- else -%}
{{ Indent2 }} MethodField(&{{Name}}::{{field.Name}}, FName("{{field.Name}}"), memory, {{field.Meta}}),
{{ NewLine }} {%- endif -%} {{ NewLine }} {%- endif -%}
{{ NewLine }} {%- endfor -%} {{ NewLine }} {%- endfor -%}
{{ Indent2 }} }; {{ Indent2 }} };