fixup codegen, remove android errors

Signed-off-by: chcurran <82187351+carlitosan@users.noreply.github.com>
This commit is contained in:
chcurran
2021-08-23 15:07:42 -07:00
parent aafe735833
commit 95a812b238
4 changed files with 12 additions and 34 deletions
@@ -44,11 +44,9 @@ namespace {{attribute_Namespace}}
{
{% endif %}
{% set className = Class.attrib['Name'] %}
{% set baseClassPair = [] %}
{% if macros.CreateBaseClassVariables(Class, baseClassPair) %}{% endif %}
{% set baseClass = baseClassPair[0] %}
{% set baseClasses = baseClassPair[1] %}
{% set bases = Class.attrib['Base'].split(';') if Class.attrib['Base'] is string else ["ScriptCanvas::Node", "ScriptCanvas::Node"] %}
{% set baseClass = bases[0] %}
{% set baseClasses = bases[1] if bases|length() > 1 else "ScriptCanvas::Node" %}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
////
@@ -68,7 +66,7 @@ namespace {{attribute_Namespace}}
// You must #include the generated header into the source header
#define SCRIPTCANVAS_NODE_{{ className }} \
public: \
AZ_COMPONENT({{ className }}, "{{ classUuid }}", {{ baseClasses}} ); \
AZ_COMPONENT({{ className }}, "{{ classUuid }}", {{ baseClasses }} ); \
static void Reflect(AZ::ReflectContext* reflection); \
void ConfigureSlots() override; \
bool RequiresDynamicSlotOrdering() const override; \
@@ -28,11 +28,9 @@ SPDX-License-Identifier: Apache-2.0 OR MIT
#include "{{ xml.attrib['Include'] }}"
{% for Class in xml.iter('Class') %}
{% set baseClassPair = [] %}
{% if macros.CreateBaseClassVariables(Class, baseClassPair) %}{% endif %}
{% set baseClass = baseClassPair[0] %}
{% set baseClasses = baseClassPair[1] %}
{% set bases = Class.attrib['Base'].split(';') if Class.attrib['Base'] is string else ["ScriptCanvas::Node", "ScriptCanvas::Node"] %}
{% set baseClass = bases[0] %}
{% set baseClasses = bases[1] if bases|length() > 1 else "ScriptCanvas::Node" %}
void {{ Class.attrib['QualifiedName'] }}::ConfigureSlots()
{
{{ baseClass }}::ConfigureSlots();
@@ -173,25 +173,6 @@ AZStd::tuple<{{returnTypes|join(", ")}}>
{# ------- #}
{# CreateBaseClassVariables #}
{# Creates "baseClass" and "baseClasses" variables to use when needed "baseClasses" is a comma separated list that in includes baseClass #}
{%- macro CreateBaseClassVariables(Class, baseClassPair) -%}
{% set baseAttrib = Class.attrib['Base'] %}
{% if baseAttrib is defined %}
{% if baseAttrib.split(';')|length > 1 %}
{% if baseClassPair.append(baseAttrib.split(';')[0]) %}{% endif %}
{% if baseClassPair.append(", ".join(baseAttrib.split(';'))) %}{% endif %}
{% else %}
{% if baseClassPair.append(baseAttrib) %}{% endif %}
{% if baseClassPair.append(baseAttrib) %}{% endif %}
{% endif %}
{% else %}
{% if baseClassPair.append("ScriptCanvas::Node") %}{% endif %}
{% if baseClassPair.append("ScriptCanvas::Node") %}{% endif %}
{% endif %}
{%- endmacro -%}
{# ------- #}
{# ------------------------------------------------------------------------------------- #}
{# NODEABLES #}
@@ -105,13 +105,14 @@ namespace ScriptCanvas
// it is very important to track these from the moment they are created...
friend struct AZ::Serialize::InstanceFactory<BehaviorContextObject, true, false>;
friend struct AZ::AnyTypeInfoConcept<BehaviorContextObject, void>;
//...so don't use the ctors, use the Create functions...
//...the friend declarations are here for compatibility with the serialization system only
AZ_FORCE_INLINE BehaviorContextObject() = default;
BehaviorContextObject& operator=(const BehaviorContextObject&) = default;
BehaviorContextObject(const BehaviorContextObject&) = default;
BehaviorContextObject(BehaviorContextObject&&) = default;
BehaviorContextObject& operator=(BehaviorContextObject&& source) = default;
BehaviorContextObject& operator=(const BehaviorContextObject&) = delete;
BehaviorContextObject(const BehaviorContextObject&) = delete;
// copy ctor
AZ_FORCE_INLINE BehaviorContextObject(const void* source, const AnyTypeInfo& typeInfo, AZ::u32 flags);