remove_child Function

private function remove_child(self, child) result(ok)

Remove child from this frame's children. Returns false if it is not one.

Type Bound

ReferenceFrame

Arguments

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

the child to remove

Return Value logical


Calls

proc~~remove_child~~CallsGraph proc~remove_child ReferenceFrame%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

Called by

proc~~remove_child~~CalledByGraph proc~remove_child ReferenceFrame%remove_child proc~detach~2 ReferenceFrame%detach proc~detach~2->proc~remove_child

Source Code

    logical function remove_child(self, child) result(ok)
        class(ReferenceFrame), intent(inout), target :: self
        class(ReferenceFrame), intent(inout), target :: child !! the child to remove
        ok = remove(self%children, self%n_children, child)
        if (ok) ok = remove(child%parents, child%n_parents, self)
        if (ok) child%stamp_ = next_motion_stamp()          ! (its first parent may have changed)
        if (ok .and. self%realized .and. child%realized) call check_status(vkf_node_remove_child(self%node_, child%node_))
    end function remove_child