| 167 | // to descend into decomposition, containment and property relationships. |
| 168 | template <typename A> |
| 169 | void descend(A* instance, json& tree, IfcUtil::IfcBaseEntity* parent = nullptr) { |
| 170 | if (instance->declaration().is(IfcSchema::IfcObjectDefinition::Class())) { |
| 171 | descend(instance->template as<IfcSchema::IfcObjectDefinition>(), tree, parent); |
| 172 | } else { |
| 173 | format_entity_instance(instance, tree); |
| 174 | } |
| 175 | } |
| 176 | |
| 177 | // @todo would be nice to generalize this with the XML version |
| 178 | // |