Update codegen

This commit is contained in:
Thomas Krijnen
2025-02-21 16:13:21 +01:00
parent da4e86a1d5
commit fb1d78b311
2 changed files with 13 additions and 13 deletions
@@ -119,7 +119,7 @@ class Implementation(codegen.Base):
null_check = ""
if arg["is_optional"]:
attr_check = (
"if(data_.get_attribute_value(%d).isNull()) { return %%s; }"
"if(get_attribute_value(%d).isNull()) { return %%s; }"
% (arg["index"] - 1,)
)
if "boost::optional" in arg["full_type"]:
@@ -246,9 +246,9 @@ class Implementation(codegen.Base):
)
superclass_num_attrs = (
"%s(IfcEntityInstanceData(storage_t(%%d)))" % type.supertypes[0]
"%s(IfcEntityInstanceData(in_memory_attribute_storage(%%d)))" % type.supertypes[0]
if len(type.supertypes) == 1
else "IfcUtil::IfcBaseEntity(IfcEntityInstanceData(storage_t(%d)))"
else "IfcUtil::IfcBaseEntity(IfcEntityInstanceData(in_memory_attribute_storage(%d)))"
) % len(constructor_arguments)
write(