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
+13 -4
View File
@@ -202,11 +202,20 @@ void IfcUtil::unescape_xml(std::string& str) {
boost::replace_all(str, ">", ">");
}
/*
Argument* IfcUtil::IfcBaseEntity::get(const std::string& name) const {
return data().getArgument(declaration().attribute_index(name));
IfcUtil::IfcBaseEntity::IfcBaseEntity(IfcEntityInstanceData&& data)
: IfcBaseClass(std::move(data))
{}
void IfcUtil::IfcBaseEntity::populate_derived() {
for (auto it = declaration().derived().begin(); it != declaration().derived().end(); ++it) {
if (*it) {
this->data().storage_.set(
std::distance(declaration().derived().begin(), it),
Derived{}
);
}
}
}
*/
AttributeValue IfcUtil::IfcBaseEntity::get(const std::string& name) const
{