set_data_files_paths_c Subroutine

public subroutine set_data_files_paths_c(ipointer, aep8_dir, igrf_dir, n, m) bind(C, name="set_data_files_paths_c")

C interface for setting the data file paths

Arguments

Type IntentOptional Attributes Name
integer(kind=c_intptr_t), intent(in) :: ipointer
character(kind=c_char, len=1), intent(in), dimension(n) :: aep8_dir
character(kind=c_char, len=1), intent(in), dimension(m) :: igrf_dir
integer(kind=c_int), intent(in) :: n

size of aep8_dir

integer(kind=c_int), intent(in) :: m

size of igrf_dir


Calls

proc~~set_data_files_paths_c~~CallsGraph proc~set_data_files_paths_c radbelt_c_module::set_data_files_paths_c proc~c2f_str radbelt_c_module::c2f_str proc~set_data_files_paths_c->proc~c2f_str proc~int_pointer_to_f_pointer radbelt_c_module::int_pointer_to_f_pointer proc~set_data_files_paths_c->proc~int_pointer_to_f_pointer proc~set_data_files_paths radbelt_module::radbelt_type%set_data_files_paths proc~set_data_files_paths_c->proc~set_data_files_paths proc~set_igrf_file_path radbelt_module::radbelt_type%set_igrf_file_path proc~set_data_files_paths->proc~set_igrf_file_path proc~set_trm_file_path radbelt_module::radbelt_type%set_trm_file_path proc~set_data_files_paths->proc~set_trm_file_path proc~set_data_file_dir shellig_module::shellig_type%set_data_file_dir proc~set_igrf_file_path->proc~set_data_file_dir proc~set_data_file_dir~2 trmfun_module::trm_type%set_data_file_dir proc~set_trm_file_path->proc~set_data_file_dir~2

Source Code

    subroutine set_data_files_paths_c(ipointer, aep8_dir, igrf_dir, n, m) bind(C, name="set_data_files_paths_c")

        integer(c_intptr_t), intent(in) :: ipointer
        integer(c_int), intent(in) :: n !! size of `aep8_dir`
        character(kind=c_char, len=1), dimension(n), intent(in) :: aep8_dir
        integer(c_int), intent(in) :: m !! size of `igrf_dir`
        character(kind=c_char, len=1), dimension(m), intent(in) :: igrf_dir

        character(len=:), allocatable :: aep8_dir_, igrf_dir_
        type(radbelt_type), pointer :: p

        call int_pointer_to_f_pointer(ipointer, p)

        if (associated(p)) then

            aep8_dir_ = c2f_str(aep8_dir)
            igrf_dir_ = c2f_str(igrf_dir)

            call p%set_data_files_paths(aep8_dir_, igrf_dir_)

        else
            error stop 'error in set_data_files_paths_c: class is not associated'
        end if

    end subroutine set_data_files_paths_c