allocate_components Subroutine

private recursive subroutine allocate_components(me, no_cmp)

Arguments

Type IntentOptional Attributes Name
type(input_t), intent(inout) :: me
type(type_dictionary), intent(inout) :: no_cmp

Calls

proc~~allocate_components~~CallsGraph proc~allocate_components allocate_components set set proc~allocate_components->set to_integer to_integer proc~allocate_components->to_integer

Called by

proc~~allocate_components~~CalledByGraph proc~allocate_components allocate_components proc~input_open_yaml input_t%input_open_yaml proc~input_open_yaml->proc~allocate_components

Source Code

recursive subroutine allocate_components(me,no_cmp)
    type(input_t),            intent(inout) :: me
    type(type_dictionary),     intent(inout) :: no_cmp
    class(input_t), pointer            :: cmp
    class(type_node), pointer            :: cmp_node
    type(type_key_value_pair), pointer :: pair
    integer :: size
    pair => no_cmp%first
    do while(associated(pair))
        select type(size_node => pair%value); class is(type_scalar)
            size = size_node%to_integer(0)
            size_node%string = '0'
            allocate(cmp)
            allocate(cmp%cmp_arr(size))
            cmp_node => cmp
            call me%cmp_by_type%set(pair%key,cmp_node)
        end select
        pair => pair%next
    enddo
end subroutine allocate_components