From 1c996013b67b70a768ee2e49accd59c5890999d7 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Thu, 22 Jun 2023 10:29:41 +0200 Subject: [PATCH] #2805 Further fixes for aggregates of select --- .../ifcopenshell/express/implementation.py | 3 +-- src/ifcopenshell-python/ifcopenshell/express/mapping.py | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/ifcopenshell-python/ifcopenshell/express/implementation.py b/src/ifcopenshell-python/ifcopenshell/express/implementation.py index 2e32e38829..24123532ba 100644 --- a/src/ifcopenshell-python/ifcopenshell/express/implementation.py +++ b/src/ifcopenshell-python/ifcopenshell/express/implementation.py @@ -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 diff --git a/src/ifcopenshell-python/ifcopenshell/express/mapping.py b/src/ifcopenshell-python/ifcopenshell/express/mapping.py index 7eecbb374d..f32cc0fae3 100644 --- a/src/ifcopenshell-python/ifcopenshell/express/mapping.py +++ b/src/ifcopenshell-python/ifcopenshell/express/mapping.py @@ -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)