fdoc

subroutinegeneric_bodiesprivate

subroutine generic_bodies(p, which, id)

Add the public bodies of the generic interfaces of module id.

Arguments

NameTypeIntentAttributesDescription
ptype(project_t)inout

the project

whichintegerin

position in p%modules

idintegerin

the module

Calls

Source

Show the code
subroutine generic_bodies(p, which, id)
    type(project_t), intent(inout) :: p     !! the project
    integer, intent(in) :: which            !! position in `p%modules`
    integer, intent(in) :: id               !! the module
    integer :: c, b, child, body

    do c = 1, size(p%list%box(id)%e%children)
        child = p%list%box(id)%e%children(c)
        if (p%list%box(child)%e%kind /= E_INTERFACE) cycle
        do b = 1, size(p%list%box(child)%e%children)
            body = p%list%box(child)%e%children(b)
            associate (e => p%list%box(body)%e)
                if (.not. is_procedure(e%kind)) cycle
                if (e%permission == 'public' .or. e%permission == 'protected') then
                    call add_symbol(p%pub(which)%procs, lowercase(e%name), body)
                end if
            end associate
        end do
    end do
end subroutine generic_bodies

Graphs

Calls

Called by