For the love of god, add support for selected enumerations

This commit is contained in:
Thomas Krijnen
2024-08-23 16:05:59 +02:00
parent c032178753
commit 0445110778
2 changed files with 14 additions and 0 deletions
@@ -0,0 +1,10 @@
ISO-10303-21;
HEADER;
FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1');
FILE_NAME('','2023-04-13T10:27:43',(),(),'IfcOpenShell v0.7.0-198fa67cc','IfcOpenShell v0.7.0-198fa67cc','');
FILE_SCHEMA(('IFC4'));
ENDSEC;
DATA;
#1=IFCPROPERTYSINGLEVALUE('Test',$,IFCCOMPLEXNUMBER((0.,0.)),$);
ENDSEC;
END-ISO-10303-21;
+4
View File
@@ -182,9 +182,13 @@ namespace {
IfcEntityInstanceData IfcParse::parse_context::construct(int name, unresolved_references& references_to_resolve, const IfcParse::declaration* decl, boost::optional<size_t> expected_size) {
std::vector<const IfcParse::parameter_type*> parameter_types;
std::unique_ptr<IfcParse::named_type> transient_named_type;
if ((decl != nullptr) && (decl->as_type_declaration() != nullptr)) {
parameter_types = { decl->as_type_declaration()->declared_type() };
} else if ((decl != nullptr) && (decl->as_enumeration_type() != nullptr)) {
transient_named_type.reset(new IfcParse::named_type(const_cast<IfcParse::declaration*>(decl)));
parameter_types = { &*transient_named_type };
} else if ((decl != nullptr) && (decl->as_entity() != nullptr)) {
auto entity_attrs = decl->as_entity()->all_attributes();
std::transform(