detach Subroutine

private subroutine detach(self)

Remove this frame from all its parents and children (before it goes out of scope or is deallocated while in a tree).

Type Bound

ReferenceFrame

Arguments

Type IntentOptional Attributes Name
class(ReferenceFrame), intent(inout), target :: self

Calls

proc~~detach~2~~CallsGraph proc~detach~2 ReferenceFrame%detach proc~remove_child ReferenceFrame%remove_child proc~detach~2->proc~remove_child interface~vkf_node_remove_child vkf_node_remove_child proc~remove_child->interface~vkf_node_remove_child proc~check_status check_status proc~remove_child->proc~check_status proc~next_motion_stamp next_motion_stamp proc~remove_child->proc~next_motion_stamp proc~remove remove proc~remove_child->proc~remove proc~find find proc~remove->proc~find

Source Code

    subroutine detach(self)
        class(ReferenceFrame), intent(inout), target :: self
        logical :: ok
        do while (self%n_parents > 0)
            ok = self%parents(self%n_parents)%p%remove_child(self)
        end do
        do while (self%n_children > 0)
            ok = self%remove_child(self%children(self%n_children)%p)
        end do
    end subroutine detach