mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 02:02:22 +00:00
populate_derived() upon instance creation, don't only rely on serialization 'hack' #5364
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user