OOPS
variables_interface.f
Go to the documentation of this file.
1 !
2 ! (C) Copyright 2019 UCAR
3 !
4 ! This software is licensed under the terms of the Apache Licence Version 2.0
5 ! which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
6 
7 !> Define interface for C++ Variables code called from Fortran
8 
9 !-------------------------------------------------------------------------------
10 interface
11 !-------------------------------------------------------------------------------
12 
13 subroutine c_variables_push_back(vars, str) bind(C, name='variables_push_back_f')
14  use, intrinsic :: iso_c_binding
15  implicit none
16 
17  type(c_ptr), value :: vars
18  character(kind=c_char,len=1), intent(in) :: str(*)
19 end subroutine c_variables_push_back
20 
21 !-------------------------------------------------------------------------------
22 
23 integer(kind=c_size_t) function c_variables_size(vars) bind(C,name='variables_size_f')
24  use, intrinsic :: iso_c_binding
25  implicit none
26 
27  type(c_ptr), value :: vars
28 end function c_variables_size
29 
30 !-------------------------------------------------------------------------------
31 
32 subroutine c_variables_getvariablelength(vars, jj, lcname) bind (C,name='variables_getvariablelength_f')
33  use, intrinsic :: iso_c_binding
34  implicit none
35  type(c_ptr), value :: vars
36  integer(c_size_t),intent(in) :: jj
37  integer(c_size_t),intent(inout) :: lcname
38 end subroutine c_variables_getvariablelength
39 
40 !-------------------------------------------------------------------------------
41 
42 subroutine c_variables_getvariable(vars, jj, lcname, lfname, cname) bind (C,name='variables_getvariable_f')
43  use, intrinsic :: iso_c_binding
44  implicit none
45  type(c_ptr), value :: vars
46  integer(c_size_t),intent(in) :: jj
47  integer(c_size_t),intent(inout) :: lcname
48  integer(c_size_t),intent(in) :: lfname
49  character(kind=c_char,len=1), intent(inout) :: cname(*)
50 end subroutine c_variables_getvariable
51 
52 !-------------------------------------------------------------------------------
53 
54 logical*1 function c_variables_has(vars, str) bind(C, name='variables_has_f')
55  use, intrinsic :: iso_c_binding
56  implicit none
57 
58  type(c_ptr), value :: vars
59  character(kind=c_char,len=1), intent(in) :: str(*)
60 end function c_variables_has
61 
62 !-------------------------------------------------------------------------------
63 end interface
64 !-------------------------------------------------------------------------------
65 
c_variables_size
Definition: variables_interface.f:23
c_variables_has
Definition: variables_interface.f:54
c_variables_getvariable
Definition: variables_interface.f:42
c_variables_getvariablelength
Definition: variables_interface.f:32
c_variables_push_back
Define interface for C++ Variables code called from Fortran.
Definition: variables_interface.f:13