[[mesh.templates]] の配列テーブルを読み込む。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(app_config), | intent(inout) | :: | cfg | |||
| type(toml_table), | intent(inout) | :: | table | |||
| type(toml_key), | intent(in) | :: | key | |||
| type(app_config_authoring), | intent(inout) | :: | authoring |
subroutine read_template_array(cfg, table, key, authoring) type(app_config), intent(inout) :: cfg type(toml_table), intent(inout) :: table type(toml_key), intent(in) :: key type(app_config_authoring), intent(inout) :: authoring type(toml_array), pointer :: array type(toml_table), pointer :: child integer :: itemplate, n, stat nullify (array) call get_value(table, key, array, stat=stat) call require_toml_success(stat, 'mesh.templates') if (.not. associated(array)) error stop 'mesh.templates must be an array of tables.' n = toml_len(array) call ensure_template_capacity(cfg, n) call ensure_authoring_template_capacity(authoring, n) if (n > 0) cfg%templates(1:n) = template_spec() if (n > 0) authoring%templates(1:n) = template_authoring_spec() do itemplate = 1, n nullify (child) call get_value(array, itemplate, child, stat=stat) call require_toml_success(stat, 'mesh.templates entry') if (.not. associated(child)) error stop 'mesh.templates entries must be tables.' cfg%templates(itemplate)%enabled = .true. call apply_template_toml_table(cfg%templates(itemplate), child, authoring%templates(itemplate)) end do cfg%n_templates = int(n, i32) end subroutine read_template_array