| 1522 | } |
| 1523 | |
| 1524 | IfcUtil::IfcBaseClass* create(IfcParse::IfcFile& f, const std::string& entity) { |
| 1525 | auto decl = f.schema()->declaration_by_name(entity); |
| 1526 | auto data = IfcEntityInstanceData(in_memory_attribute_storage(decl->as_entity()->attribute_count())); |
| 1527 | auto inst = f.schema()->instantiate(decl, std::move(data)); |
| 1528 | if (decl->is("IfcRoot")) { |
| 1529 | IfcParse::IfcGlobalId guid; |
| 1530 | latebound_access::set(inst, "GlobalId", (std::string) guid); |
| 1531 | } |
| 1532 | return f.addEntity(inst); |
| 1533 | } |
| 1534 | } |
| 1535 | |
| 1536 | void fix_quantities(IfcParse::IfcFile& f, bool no_progress, bool quiet, bool stderr_progress) { |
no test coverage detected