subroutinechildren_ofprivate
subroutine children_of(site, id, want, ids)
The visible children of id that want accepts, sorted: 1 variables, 2 functions, 3 subroutines,
4 explicit and generic interfaces, 5 abstract interfaces, 6 types, 7 bindings, 8 final procedures,
9 namelists, 10 common blocks, 11 enumerations, 12 separate module procedures.
Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
| site | type(site_t) | in | the site | |
| id | integer | in | the entity | |
| want | integer | in | what to find | |
| ids | integer | out | allocatabledimension(:) | the children |
Calls
Source
Show the code
subroutine children_of(site, id, want, ids)
type(site_t), intent(in) :: site !! the site
integer, intent(in) :: id !! the entity
integer, intent(in) :: want !! what to find
integer, allocatable, intent(out) :: ids(:) !! the children
integer :: k, child
allocate (ids(0))
associate (e => site%p%list%box(id)%e)
do k = 1, size(e%children)
child = e%children(k)
if (accepts(site%p%list%box(child)%e, want)) call push_int(ids, child)
end do
if (allocated(e%more%inherited)) then
do k = 1, size(e%more%inherited)
child = e%more%inherited(k)
if (accepts(site%p%list%box(child)%e, want) .and. contains_string(e%display, &
site%p%list%box(child)%e%permission)) then
call push_int(ids, child)
end if
end do
end if
end associate
call sort_ids(site, ids)
end subroutine children_of