get_toml_string Subroutine

public subroutine get_toml_string(table, key, value, context)

TOML の文字列キーを固定長文字列へ読み込む。

Arguments

Type IntentOptional Attributes Name
type(toml_table), intent(inout) :: table
type(toml_key), intent(in) :: key
character(len=*), intent(out) :: value
character(len=*), intent(in) :: context

Calls

proc~~get_toml_string~~CallsGraph proc~get_toml_string get_toml_string get_value get_value proc~get_toml_string->get_value proc~require_toml_success require_toml_success proc~get_toml_string->proc~require_toml_success

Called by

proc~~get_toml_string~~CalledByGraph proc~get_toml_string get_toml_string proc~apply_mesh_group_toml_table apply_mesh_group_toml_table proc~apply_mesh_group_toml_table->proc~get_toml_string proc~apply_mesh_toml_table apply_mesh_toml_table proc~apply_mesh_toml_table->proc~get_toml_string proc~read_mesh_groups_table read_mesh_groups_table proc~apply_mesh_toml_table->proc~read_mesh_groups_table proc~read_template_array read_template_array proc~apply_mesh_toml_table->proc~read_template_array proc~apply_output_toml_table apply_output_toml_table proc~apply_output_toml_table->proc~get_toml_string proc~apply_particles_species_toml_table apply_particles_species_toml_table proc~apply_particles_species_toml_table->proc~get_toml_string proc~apply_sim_toml_table apply_sim_toml_table proc~apply_sim_toml_table->proc~get_toml_string proc~get_toml_boundary_mode get_toml_boundary_mode proc~apply_sim_toml_table->proc~get_toml_boundary_mode proc~apply_template_toml_table apply_template_toml_table proc~apply_template_toml_table->proc~get_toml_string proc~get_toml_boundary_mode->proc~get_toml_string proc~apply_toml_document apply_toml_document proc~apply_toml_document->proc~apply_mesh_toml_table proc~apply_toml_document->proc~apply_output_toml_table proc~apply_toml_document->proc~apply_sim_toml_table proc~apply_particles_toml_table apply_particles_toml_table proc~apply_toml_document->proc~apply_particles_toml_table proc~read_mesh_groups_table->proc~apply_mesh_group_toml_table proc~read_particle_species_array read_particle_species_array proc~read_particle_species_array->proc~apply_particles_species_toml_table proc~read_template_array->proc~apply_template_toml_table proc~apply_particles_toml_table->proc~read_particle_species_array proc~load_toml_config load_toml_config proc~load_toml_config->proc~apply_toml_document proc~load_app_config load_app_config proc~load_app_config->proc~load_toml_config proc~load_or_init_run_state load_or_init_run_state proc~load_or_init_run_state->proc~load_app_config program~main main program~main->proc~load_or_init_run_state

Source Code

  subroutine get_toml_string(table, key, value, context)
    type(toml_table), intent(inout) :: table
    type(toml_key), intent(in) :: key
    character(len=*), intent(out) :: value
    character(len=*), intent(in) :: context
    character(len=:), allocatable :: tmp
    integer :: stat

    call get_value(table, key, tmp, stat=stat)
    call require_toml_success(stat, context)
    if (.not. allocated(tmp)) error stop 'Invalid TOML value for '//trim(context)//'.'
    value = ''
    value = trim(tmp)
  end subroutine get_toml_string