36 use,
intrinsic :: iso_c_binding
61 type,
bind(c) :: kim_collection_item_type_type
68 integer(c_int) collection_item_type_id
78 bind(c, name="KIM_COLLECTION_ITEM_TYPE_modelDriver") &
88 bind(c, name="KIM_COLLECTION_ITEM_TYPE_portableModel") &
98 bind(c, name="KIM_COLLECTION_ITEM_TYPE_simulatorModel") &
107 module procedure kim_collection_item_type_known
115 interface operator(.eq.)
116 module procedure kim_collection_item_type_equal
117 end interface operator(.eq.)
124 interface operator(.ne.)
125 module procedure kim_collection_item_type_not_equal
126 end interface operator(.ne.)
136 module procedure kim_collection_item_type_from_string
145 module procedure kim_collection_item_type_to_string
154 logical recursive function kim_collection_item_type_known( &
155 collection_item_type)
158 integer(c_int) recursive function known(collection_item_type) &
159 bind(c, name="KIM_CollectionItemType_Known")
160 use,
intrinsic :: iso_c_binding
163 type(kim_collection_item_type_type),
intent(in),
value :: &
167 type(kim_collection_item_type_type),
intent(in) :: collection_item_type
169 kim_collection_item_type_known = (known(collection_item_type) /= 0)
170 end function kim_collection_item_type_known
177 logical recursive function kim_collection_item_type_equal(lhs, rhs)
179 type(kim_collection_item_type_type),
intent(in) :: lhs
180 type(kim_collection_item_type_type),
intent(in) :: rhs
182 kim_collection_item_type_equal &
183 = (lhs%collection_item_type_id == rhs%collection_item_type_id)
184 end function kim_collection_item_type_equal
191 logical recursive function kim_collection_item_type_not_equal(lhs, rhs)
193 type(kim_collection_item_type_type),
intent(in) :: lhs
194 type(kim_collection_item_type_type),
intent(in) :: rhs
196 kim_collection_item_type_not_equal = .not. (lhs == rhs)
197 end function kim_collection_item_type_not_equal
206 recursive subroutine kim_collection_item_type_from_string( &
207 string, collection_item_type)
210 type(kim_collection_item_type_type)
recursive function &
211 from_string(string)
bind(c, name="KIM_CollectionItemType_FromString")
212 use,
intrinsic :: iso_c_binding
215 character(c_char),
intent(in) :: string(*)
216 end function from_string
218 character(len=*, kind=c_char),
intent(in) :: string
219 type(kim_collection_item_type_type),
intent(out) :: collection_item_type
221 collection_item_type = from_string(trim(string)//c_null_char)
222 end subroutine kim_collection_item_type_from_string
229 recursive subroutine kim_collection_item_type_to_string( &
230 collection_item_type, string)
231 use kim_convert_string_module,
only: kim_convert_c_char_ptr_to_string
234 type(c_ptr)
recursive function get_string(collection_item_type) &
235 bind(c, name="KIM_CollectionItemType_ToString")
236 use,
intrinsic :: iso_c_binding
239 type(kim_collection_item_type_type),
intent(in),
value :: &
243 type(kim_collection_item_type_type),
intent(in) :: collection_item_type
244 character(len=*, kind=c_char),
intent(out) :: string
249 call kim_convert_c_char_ptr_to_string(p, string)
250 end subroutine kim_collection_item_type_to_string
259 number_of_collection_item_types)
262 recursive subroutine get_number_of_collection_item_types( &
263 number_of_collection_item_types) &
264 bind(c, name="KIM_COLLECTION_ITEM_TYPE_GetNumberOfCollectionItemTypes")
265 use,
intrinsic :: iso_c_binding
267 integer(c_int),
intent(out) :: number_of_collection_item_types
268 end subroutine get_number_of_collection_item_types
270 integer(c_int),
intent(out) :: number_of_collection_item_types
272 call get_number_of_collection_item_types(number_of_collection_item_types)
282 collection_item_type, ierr)
285 integer(c_int) recursive function get_collection_item_type( &
286 index, collection_item_type) &
287 bind(c, name="KIM_COLLECTION_ITEM_TYPE_GetCollectionItemType")
288 use,
intrinsic :: iso_c_binding
291 integer(c_int),
intent(in),
value :: index
293 end function get_collection_item_type
295 integer(c_int),
intent(in) :: index
297 integer(c_int),
intent(out) :: ierr
299 ierr = get_collection_item_type(index - 1, collection_item_type)
KIM::CollectionItemType::CollectionItemType(std::string const &)
Determines if the object is a quantity known to the KIM API.
Converts the object to a string.
An Extensible Enumeration for the CollectionItemType's supported by the KIM API.
type(kim_collection_item_type_type), save, bind(C, name="KIM_COLLECTION_ITEM_TYPE_simulatorModel"), public, protected kim_collection_item_type_simulator_model
The standard simulatorModel CollectionItemType.
recursive subroutine, public kim_get_number_of_collection_item_types(number_of_collection_item_types)
Get the number of standard CollectionItemType's defined by the KIM API.
recursive subroutine, public kim_get_collection_item_type(index, collection_item_type, ierr)
Get the identity of each defined standard CollectionItemType.
type(kim_collection_item_type_type), save, bind(C, name="KIM_COLLECTION_ITEM_TYPE_modelDriver"), public, protected kim_collection_item_type_model_driver
The standard modelDriver CollectionItemType.
type(kim_collection_item_type_type), save, bind(C, name="KIM_COLLECTION_ITEM_TYPE_portableModel"), public, protected kim_collection_item_type_portable_model
The standard portableModel CollectionItemType.
An Extensible Enumeration for the CollectionItemType's supported by the KIM API.