populate_derived() upon instance creation, don't only rely on serialization 'hack' #5364

This commit is contained in:
Thomas Krijnen
2024-10-07 20:41:34 +02:00
parent 8e8136ffb6
commit aa9b2d7428
4 changed files with 22 additions and 7 deletions
@@ -210,7 +210,7 @@ entity_implementation = """// Function implementations for %(name)s
const IfcParse::entity& %(schema_name)s::%(name)s::declaration() const { return *((IfcParse::entity*)%(schema_name_upper)s_types[%(index_in_schema)d]); }
const IfcParse::entity& %(schema_name)s::%(name)s::Class() { return *((IfcParse::entity*)%(schema_name_upper)s_types[%(index_in_schema)d]); }
%(schema_name)s::%(name)s::%(name)s(IfcEntityInstanceData&& e) : %(superclass)s { }
%(schema_name)s::%(name)s::%(name)s(%(constructor_arguments)s) : %(superclass_num_attrs)s { %(constructor_implementation)s }
%(schema_name)s::%(name)s::%(name)s(%(constructor_arguments)s) : %(superclass_num_attrs)s { %(constructor_implementation)s; populate_derived(); }
"""
# data_ = e;