@@ -78,17 +78,6 @@ class get_type_visitor : public boost::static_visitor<std::string> {
7878 }
7979};
8080
81- // A function to be called recursively. Template specialization is used
82- // to descend into decomposition, containment and property relationships.
83- template <typename A>
84- void descend (A* instance, json& tree, IfcUtil::IfcBaseEntity* parent = nullptr ) {
85- if (instance->declaration ().is (IfcSchema::IfcObjectDefinition::Class ())) {
86- return descend (instance->template as <IfcSchema::IfcObjectDefinition>(), tree, parent);
87- } else {
88- return format_entity_instance (instance, tree);
89- }
90- }
91-
9281// Returns related entity instances using IFC's objectified relationship
9382// model. The second and third argument require a member function pointer.
9483template <typename T, typename U, typename V, typename F, typename G>
@@ -173,6 +162,18 @@ void format_entity_instance(IfcUtil::IfcBaseEntity* instance, json& tree, IfcUti
173162 tree.push_back (child);
174163}
175164
165+
166+ // A function to be called recursively. Template specialization is used
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+
176177// @todo would be nice to generalize this with the XML version
177178//
178179// Descends into the tree by recursing into IfcRelContainedInSpatialStructure,
0 commit comments