#2805 Further fixes for aggregates of select

This commit is contained in:
Thomas Krijnen
2023-06-22 10:29:41 +02:00
parent 65cb47e2d8
commit 1c996013b6
2 changed files with 4 additions and 5 deletions
@@ -85,7 +85,6 @@ class Implementation(codegen.Base):
def find_template(arg):
simple = mapping.schema.is_simpletype(arg["list_instance_type"])
select = arg["list_instance_type"] == "IfcUtil::IfcBaseClass"
express = (
mapping.flatten_type_string(arg["list_instance_type"]) in mapping.express_to_cpp_typemapping
)
@@ -93,7 +92,7 @@ class Implementation(codegen.Base):
return templates.get_attr_stmt_enum
elif arg["is_nested"] and arg["is_templated_list"]:
return templates.get_attr_stmt_nested_array
elif arg["is_templated_list"] and not (select or simple or express):
elif arg["is_templated_list"] and not (simple or express):
return templates.get_attr_stmt_array
elif arg["non_optional_type"].endswith("*"):
return templates.get_attr_stmt_entity
@@ -224,9 +224,9 @@ class Mapping:
isinstance(v, nodes.SimpleType) and isinstance(v.type, nodes.StringType)
):
return "string"
if self.schema.is_select(v):
return "IfcUtil::IfcBaseClass"
elif str(v) in self.schema.types or str(v) in self.schema.entities:
# if self.schema.is_select(v):
# return "IfcUtil::IfcBaseClass"
if str(v) in self.schema.types or str(v) in self.schema.entities:
return "::%s::%s" % (self.schema.name.capitalize(), v)
else:
return str(v)