mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 09:48:32 +00:00
#2805 Further fixes for aggregates of select
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user