35 use,
intrinsic :: iso_c_binding
41 kim_data_type_from_string, &
44 kim_data_type_string, &
49 kim_data_type_get_number_of_data_types, &
50 kim_data_type_get_data_type
53 type, bind(c) :: kim_data_type_type
54 integer(c_int) :: data_type_id
55 end type kim_data_type_type
57 type(kim_data_type_type),
protected, &
58 bind(c, name=
"KIM_DATA_TYPE_Integer") &
60 type(kim_data_type_type),
protected, &
61 bind(c, name=
"KIM_DATA_TYPE_Double") &
64 interface operator (.eq.)
65 logical function kim_data_type_equal(left, right)
66 use,
intrinsic :: iso_c_binding
67 import kim_data_type_type
69 type(kim_data_type_type),
intent(in) :: left
70 type(kim_data_type_type),
intent(in) :: right
71 end function kim_data_type_equal
72 end interface operator (.eq.)
74 interface operator (.ne.)
75 logical function kim_data_type_not_equal(left, right)
76 use,
intrinsic :: iso_c_binding
77 import kim_data_type_type
79 type(kim_data_type_type),
intent(in) :: left
80 type(kim_data_type_type),
intent(in) :: right
81 end function kim_data_type_not_equal
82 end interface operator (.ne.)
85 subroutine kim_data_type_from_string(string, data_type)
86 use,
intrinsic :: iso_c_binding
87 import kim_data_type_type
89 character(len=*, kind=c_char),
intent(in) :: string
90 type(kim_data_type_type),
intent(out) :: data_type
91 end subroutine kim_data_type_from_string
93 subroutine kim_data_type_string(data_type, string)
94 use,
intrinsic :: iso_c_binding
95 import kim_data_type_type
97 type(kim_data_type_type),
intent(in),
value :: data_type
98 character(len=*, kind=c_char),
intent(out) :: string
99 end subroutine kim_data_type_string
101 subroutine kim_data_type_get_number_of_data_types(number_of_data_types)
102 use,
intrinsic :: iso_c_binding
104 integer(c_int),
intent(out) :: number_of_data_types
105 end subroutine kim_data_type_get_number_of_data_types
107 subroutine kim_data_type_get_data_type(index, data_type, ierr)
108 use,
intrinsic :: iso_c_binding
109 import kim_data_type_type
111 integer(c_int),
intent(in),
value :: index
112 type(kim_data_type_type),
intent(out) :: data_type
113 integer(c_int),
intent(out) :: ierr
114 end subroutine kim_data_type_get_data_type
type(kim_data_type_type), public, protected kim_data_type_double
type(kim_data_type_type), public, protected kim_data_type_integer