def reparentClassLike(self):
        '''
        Helper method for :func:`~exhale.graph.ExhaleRoot.reparentAll`. Iterates over the
        ``self.class_like`` list and adds each object as a child to a namespace if the
        class, or struct is a member of that namespace.  Many classes / structs will be
        reparented to a namespace node, these will remain in ``self.class_like``.
        However, if a class or struct is reparented to a different class or struct (it
        is a nested class / struct), it *will* be removed from so that the class view
        hierarchy is generated correctly.
        '''
        removals = []
        for cl in self.class_like:
            parts = cl.name.split("::")
            if len(parts) > 1:
                parent_name = "::".join(parts[:-1])
                for parent_cl in self.class_like:
                    if parent_cl.name == parent_name:
                        parent_cl.children.append(cl)
                        cl.parent = parent_cl
                        removals.append(cl)
                        break

        for rm in removals:
            if rm in self.class_like:
                self.class_like.remove(rm)
def reparentClassLike ( self ) : removals = [ ] for cl in self . class_like : parts = cl . name . split ( "::" ) if len ( parts ) > 1 : parent_name = "::" . join ( parts [ : - 1 ] ) for parent_cl in self . class_like : if parent_cl . name == parent_name : parent_cl . children . append ( cl ) cl . parent = parent_cl removals . append ( cl ) break for rm in removals : if rm in self . class_like : self . class_like . remove ( rm )
Helper method for :func:`~exhale.graph.ExhaleRoot.reparentAll`. Iterates over the
        ``self.class_like`` list and adds each object as a child to a namespace if the
        class, or struct is a member of that namespace.  Many classes / structs will be
        reparented to a namespace node, these will remain in ``self.class_like``.
        However, if a class or struct is reparented to a different class or struct (it
        is a nested class / struct), it *will* be removed from so that the class view
        hierarchy is generated correctly.