frame_string Function

private recursive function frame_string(self, prefix) result(str)

The tree below this frame, one line per frame ("name (info)"), in OpenFrames' createFrameString format: children are prefixed "|-->".

Type Bound

ReferenceFrame

Arguments

Type IntentOptional Attributes Name
class(ReferenceFrame), intent(in) :: self
character(len=*), intent(in), optional :: prefix

before this frame's line (default ' ')

Return Value character(len=:), allocatable


Calls

proc~~frame_string~~CallsGraph proc~frame_string ReferenceFrame%frame_string proc~frame_string->proc~frame_string proc~frame_info ReferenceFrame%frame_info proc~frame_string->proc~frame_info proc~name ReferenceFrame%name proc~frame_string->proc~name

Source Code

    recursive function frame_string(self, prefix) result(str)
        class(ReferenceFrame), intent(in) :: self
        character(len=*), intent(in), optional :: prefix    !! before this frame's line (default ' ')
        character(len=:), allocatable :: str, pre
        integer :: k
        pre = ' '
        if (present(prefix)) pre = prefix
        str = pre//self%name()//' ('//self%frame_info()//')'//new_line('a')
        if (pre(len(pre):len(pre)) == '>') pre(len(pre):len(pre)) = '-'
        pre = pre//'|-->'
        do k = 1, self%n_children
            str = str//self%children(k)%p%frame_string(pre)
        end do
    end function frame_string