39 use,
intrinsic :: iso_c_binding
45 kim_model_compute_arguments_destroy_handle_type, &
51 kim_get_model_buffer_pointer, &
60 type, bind(c) :: kim_model_compute_arguments_destroy_handle_type
61 type(c_ptr) :: p = c_null_ptr
62 end type kim_model_compute_arguments_destroy_handle_type
67 type(kim_model_compute_arguments_destroy_handle_type),
protected,
save &
74 interface operator(.eq.)
75 module procedure kim_model_compute_arguments_destroy_handle_equal
76 end interface operator(.eq.)
82 interface operator(.ne.)
83 module procedure kim_model_compute_arguments_destroy_handle_not_equal
84 end interface operator(.ne.)
93 interface kim_get_model_buffer_pointer
95 kim_model_compute_arguments_destroy_get_model_buffer_pointer
96 end interface kim_get_model_buffer_pointer
104 interface kim_log_entry
106 end interface kim_log_entry
114 interface kim_to_string
116 end interface kim_to_string
123 logical recursive function kim_model_compute_arguments_destroy_handle_equal( &
126 type(kim_model_compute_arguments_destroy_handle_type),
intent(in) :: lhs
127 type(kim_model_compute_arguments_destroy_handle_type),
intent(in) :: rhs
129 if ((.not. c_associated(lhs%p)) .and. (.not. c_associated(rhs%p)))
then 130 kim_model_compute_arguments_destroy_handle_equal = .true.
132 kim_model_compute_arguments_destroy_handle_equal = c_associated(lhs%p, &
135 end function kim_model_compute_arguments_destroy_handle_equal
141 logical recursive function &
142 kim_model_compute_arguments_destroy_handle_not_equal(lhs, rhs)
144 type(kim_model_compute_arguments_destroy_handle_type),
intent(in) :: lhs
145 type(kim_model_compute_arguments_destroy_handle_type),
intent(in) :: rhs
147 kim_model_compute_arguments_destroy_handle_not_equal = &
149 end function kim_model_compute_arguments_destroy_handle_not_equal
158 recursive subroutine &
159 kim_model_compute_arguments_destroy_get_model_buffer_pointer( &
160 model_compute_arguments_destroy_handle, ptr)
161 use kim_interoperable_types_module
, only: &
162 kim_model_compute_arguments_destroy_type
165 recursive subroutine get_model_buffer_pointer( &
166 model_compute_arguments_destroy, ptr) &
167 bind(c, name=
"KIM_ModelComputeArgumentsDestroy_GetModelBufferPointer")
168 use,
intrinsic :: iso_c_binding
169 use kim_interoperable_types_module
, only: &
170 kim_model_compute_arguments_destroy_type
172 type(kim_model_compute_arguments_destroy_type),
intent(in) :: &
173 model_compute_arguments_destroy
174 type(c_ptr),
intent(out) :: ptr
175 end subroutine get_model_buffer_pointer
177 type(kim_model_compute_arguments_destroy_handle_type),
intent(in) :: &
178 model_compute_arguments_destroy_handle
179 type(c_ptr),
intent(out) :: ptr
180 type(kim_model_compute_arguments_destroy_type),
pointer :: &
181 model_compute_arguments_destroy
183 call c_f_pointer(model_compute_arguments_destroy_handle%p, &
184 model_compute_arguments_destroy)
185 call get_model_buffer_pointer(model_compute_arguments_destroy, ptr)
186 end subroutine kim_model_compute_arguments_destroy_get_model_buffer_pointer
195 model_compute_arguments_destroy_handle, log_verbosity, message)
197 use kim_interoperable_types_module
, only: &
198 kim_model_compute_arguments_destroy_type
201 recursive subroutine log_entry( &
202 model_compute_arguments_destroy, log_verbosity, message, line_number, &
203 file_name) bind(c, name="KIM_ModelComputeArgumentsDestroy_LogEntry")
204 use,
intrinsic :: iso_c_binding
206 use kim_interoperable_types_module
, only: &
207 kim_model_compute_arguments_destroy_type
209 type(kim_model_compute_arguments_destroy_type),
intent(in) :: &
210 model_compute_arguments_destroy
211 type(kim_log_verbosity_type),
intent(in),
value :: log_verbosity
212 character(c_char),
intent(in) :: message(*)
213 integer(c_int),
intent(in),
value :: line_number
214 character(c_char),
intent(in) :: file_name(*)
215 end subroutine log_entry
217 type(kim_model_compute_arguments_destroy_handle_type),
intent(in) :: &
218 model_compute_arguments_destroy_handle
219 type(kim_log_verbosity_type),
intent(in) :: log_verbosity
220 character(len=*, kind=c_char),
intent(in) :: message
221 type(kim_model_compute_arguments_destroy_type),
pointer :: &
222 model_compute_arguments_destroy
224 call c_f_pointer(model_compute_arguments_destroy_handle%p, &
225 model_compute_arguments_destroy)
226 call log_entry(model_compute_arguments_destroy, log_verbosity, &
227 trim(message)//c_null_char, 0,
""//c_null_char)
237 model_compute_arguments_destroy_handle, string)
238 use kim_convert_string_module
, only: kim_convert_c_char_ptr_to_string
239 use kim_interoperable_types_module
, only: &
240 kim_model_compute_arguments_destroy_type
243 type(c_ptr)
recursive function model_compute_arguments_destroy_string( &
244 model_compute_arguments_destroy) &
245 bind(c, name=
"KIM_ModelComputeArgumentsDestroy_ToString")
246 use,
intrinsic :: iso_c_binding
247 use kim_interoperable_types_module
, only: &
248 kim_model_compute_arguments_destroy_type
250 type(kim_model_compute_arguments_destroy_type),
intent(in) :: &
251 model_compute_arguments_destroy
252 end function model_compute_arguments_destroy_string
254 type(kim_model_compute_arguments_destroy_handle_type),
intent(in) :: &
255 model_compute_arguments_destroy_handle
256 character(len=*, kind=c_char),
intent(out) :: string
257 type(kim_model_compute_arguments_destroy_type),
pointer :: &
258 model_compute_arguments_destroy
262 call c_f_pointer(model_compute_arguments_destroy_handle%p, &
263 model_compute_arguments_destroy)
264 p = model_compute_arguments_destroy_string(model_compute_arguments_destroy)
265 call kim_convert_c_char_ptr_to_string(p, string)
type(kim_model_compute_arguments_destroy_handle_type), save, public, protected kim_model_compute_arguments_destroy_null_handle
NULL handle for use in comparisons.
recursive subroutine kim_model_compute_arguments_destroy_log_entry(model_compute_arguments_destroy_handle, log_verbosity, message)
Write a log entry into the log file.
Provides the interface to a KIM API ComputeArguments object for use by models within their MODEL_ROUT...
recursive subroutine kim_model_compute_arguments_destroy_to_string(model_compute_arguments_destroy_handle, string)
Get a string representing the internal state of the ComputeArguments object.
An Extensible Enumeration for the LogVerbosity's supported by the KIM API.