fdoc

functionacceptspureprivate

pure logical function accepts(c, want)

True if c is of the category want of children_of.

Arguments

NameTypeIntentAttributesDescription
ctype(entity_t)in

the entity

wantintegerin

the category

Result

NameTypeAttributesDescription
acceptslogical

Source

Show the code
pure logical function accepts(c, want)
    type(entity_t), intent(in) :: c     !! the entity
    integer, intent(in) :: want         !! the category

    accepts = .false.
    if (.not. c%visible .or. c%kind == E_NONE) return
    select case (want)
    case (1); accepts = c%kind == E_VARIABLE .and. c%var_role == VAR_PLAIN
    case (2); accepts = c%kind == E_FUNCTION .and. c%iface == IFACE_NONE
    case (3); accepts = c%kind == E_SUBROUTINE .and. c%iface == IFACE_NONE
    case (4); accepts = c%kind == E_INTERFACE .or. c%iface == IFACE_EXPLICIT
    case (5); accepts = c%iface == IFACE_ABSTRACT
    case (6); accepts = c%kind == E_TYPE
    case (7); accepts = c%kind == E_BOUNDPROC
    case (8); accepts = c%kind == E_FINAL
    case (9); accepts = c%kind == E_NAMELIST
    case (10); accepts = c%kind == E_COMMON
    case (11); accepts = c%kind == E_ENUM
    case (12); accepts = c%kind == E_MODPROC
    end select
end function accepts

Graphs

Called by