fdoc

functionlist_ofprivate

integer function list_of(site, id) result(which)

The list page that entity id belongs on, or 0.

Arguments

NameTypeIntentAttributesDescription
sitetype(site_t)in

the site

idintegerin

the entity

Result

NameTypeAttributesDescription
whichinteger

Calls

Source

Show the code
integer function list_of(site, id) result(which)
    type(site_t), intent(in) :: site    !! the site
    integer, intent(in) :: id           !! the entity
    logical :: page

    which = 0
    associate (e => site%p%list%box(id)%e)
        if (allocated(e%external_url) .or. .not. e%visible .or. .not. allocated(e%name)) return
        page = has_page(site, id)
        select case (e%kind)
        case (E_FILE); which = LIST_FILES
        case (E_MODULE, E_SUBMODULE); which = LIST_MODULES
        case (E_PROGRAM); which = LIST_PROGRAMS
        case (E_BLOCKDATA); which = LIST_BLOCKDATA
        case (E_NAMELIST); which = LIST_NAMELISTS
        case (E_TYPE); if (page) which = LIST_TYPES
        case (E_INTERFACE); if (page) which = LIST_PROCEDURES
        case (E_SUBROUTINE, E_FUNCTION, E_MODPROC)
            if (.not. page) return
            which = merge(LIST_ABSINT, LIST_PROCEDURES, e%iface == IFACE_ABSTRACT)
        end select
    end associate
end function list_of

Graphs

Calls

Called by