36 use,
intrinsic :: iso_c_binding
78 type,
bind(c) :: kim_collections_handle_type
79 type(c_ptr) :: p = c_null_ptr
91 interface operator(.eq.)
92 module procedure kim_collections_handle_equal
93 end interface operator(.eq.)
98 interface operator(.ne.)
99 module procedure kim_collections_handle_not_equal
100 end interface operator(.ne.)
108 module procedure kim_collections_get_item_type
329 logical recursive function kim_collections_handle_equal(lhs, rhs)
331 type(kim_collections_handle_type),
intent(in) :: lhs
332 type(kim_collections_handle_type),
intent(in) :: rhs
334 if ((.not. c_associated(lhs%p)) .and. (.not. c_associated(rhs%p)))
then
335 kim_collections_handle_equal = .true.
337 kim_collections_handle_equal = c_associated(lhs%p, rhs%p)
339 end function kim_collections_handle_equal
344 logical recursive function kim_collections_handle_not_equal(lhs, rhs)
346 type(kim_collections_handle_type),
intent(in) :: lhs
347 type(kim_collections_handle_type),
intent(in) :: rhs
349 kim_collections_handle_not_equal = .not. (lhs == rhs)
350 end function kim_collections_handle_not_equal
360 integer(c_int) recursive function create(collections) &
361 bind(c, name="KIM_Collections_Create")
362 use,
intrinsic :: iso_c_binding
364 type(c_ptr),
intent(out) :: collections
368 integer(c_int),
intent(out) :: ierr
370 type(c_ptr) :: pcollections
372 ierr = create(pcollections)
373 collections_handle%p = pcollections
384 recursive subroutine destroy(collections) &
385 bind(c, name="KIM_Collections_Destroy")
386 use,
intrinsic :: iso_c_binding
388 type(c_ptr),
intent(inout) :: collections
389 end subroutine destroy
393 type(c_ptr) :: pcollections
394 pcollections = collections_handle%p
395 call destroy(pcollections)
396 collections_handle%p = c_null_ptr
404 recursive subroutine kim_collections_get_item_type(collections_handle, &
405 item_name, item_type, ierr)
406 use kim_interoperable_types_module,
only: kim_collections_type
410 integer(c_int) recursive function get_item_type( &
411 collections, item_name, item_type) &
412 bind(c, name="KIM_Collections_GetItemType")
413 use,
intrinsic :: iso_c_binding
414 use kim_interoperable_types_module,
only: kim_collections_type
418 type(kim_collections_type),
intent(in) :: collections
419 character(c_char),
intent(in) :: item_name(*)
420 type(kim_collection_item_type_type),
intent(out) :: item_type
423 type(kim_collections_handle_type),
intent(in) :: collections_handle
424 character(len=*, kind=c_char),
intent(in) :: item_name
425 type(kim_collection_item_type_type),
intent(out) :: item_type
426 integer(c_int),
intent(out) :: ierr
427 type(kim_collections_type),
pointer :: collections
429 call c_f_pointer(collections_handle%p, collections)
430 ierr =
get_item_type(collections, trim(item_name)//c_null_char, item_type)
431 end subroutine kim_collections_get_item_type
439 recursive subroutine &
441 collections_handle, item_type, item_name, file_name, collection, ierr)
442 use kim_interoperable_types_module,
only: kim_collections_type
443 use kim_convert_string_module,
only: kim_convert_c_char_ptr_to_string
448 integer(c_int) recursive function &
449 get_item_library_file_name_and_collection( &
450 collections, item_type, item_name, file_name, collection) &
451 bind(c, name="KIM_Collections_GetItemLibraryFileNameAndCollection")
452 use,
intrinsic :: iso_c_binding
453 use kim_interoperable_types_module,
only: kim_collections_type
458 type(kim_collections_type),
intent(in) :: collections
459 type(kim_collection_item_type_type),
intent(in),
value :: item_type
460 character(c_char),
intent(in) :: item_name(*)
461 type(c_ptr),
intent(out) :: file_name
462 type(kim_collection_type),
intent(out) :: collection
465 type(kim_collections_handle_type),
intent(in) :: collections_handle
466 type(kim_collection_item_type_type),
intent(in) :: item_type
467 character(len=*, kind=c_char),
intent(in) :: item_name
468 character(len=*, kind=c_char),
intent(out) :: file_name
469 type(kim_collection_type),
intent(out) :: collection
470 integer(c_int),
intent(out) :: ierr
471 type(kim_collections_type),
pointer :: collections
473 type(c_ptr) :: pfile_name
475 call c_f_pointer(collections_handle%p, collections)
479 trim(item_name)//c_null_char, &
482 call kim_convert_c_char_ptr_to_string(pfile_name, file_name)
492 collections_handle, item_type, item_name, extent, ierr)
493 use kim_interoperable_types_module,
only: kim_collections_type
497 integer(c_int) recursive function cache_list_of_item_metadata_files( &
498 collections, item_type, item_name, extent) &
499 bind(c, name="KIM_Collections_CacheListOfItemMetadataFiles")
500 use,
intrinsic :: iso_c_binding
501 use kim_interoperable_types_module,
only: kim_collections_type
505 type(kim_collections_type),
intent(in) :: collections
506 type(kim_collection_item_type_type),
intent(in),
value :: item_type
507 character(c_char),
intent(in) :: item_name(*)
508 integer(c_int),
intent(out) :: extent
511 type(kim_collections_handle_type),
intent(in) :: collections_handle
512 type(kim_collection_item_type_type),
intent(in) :: item_type
513 character(len=*, kind=c_char),
intent(in) :: item_name
514 integer(c_int),
intent(out) :: extent
515 integer(c_int),
intent(out) :: ierr
516 type(kim_collections_type),
pointer :: collections
518 call c_f_pointer(collections_handle%p, collections)
520 trim(item_name)//c_null_char, &
532 collections_handle, index, file_length, available_as_string, ierr)
533 use kim_interoperable_types_module,
only: kim_collections_type
536 integer(c_int) recursive function get_item_metadata_file( &
537 collections, index, file_name, file_length, file_raw_data, &
538 available_as_string, file_string) &
539 bind(c, name="KIM_Collections_GetItemMetadataFile_fortran")
540 use,
intrinsic :: iso_c_binding
541 use kim_interoperable_types_module,
only: kim_collections_type
543 type(kim_collections_type),
intent(in) :: collections
544 integer(c_int),
intent(in),
value :: index
545 type(c_ptr),
intent(out) :: file_name
546 integer(c_long),
intent(out) :: file_length
547 type(c_ptr),
intent(out) :: file_raw_data
548 integer(c_int),
intent(out) :: available_as_string
549 type(c_ptr),
intent(out) :: file_string
552 type(kim_collections_handle_type),
intent(in) :: collections_handle
553 integer(c_int),
intent(in) :: index
554 integer(c_long),
intent(out) :: file_length
555 integer(c_int),
intent(out) :: available_as_string
556 integer(c_int),
intent(out) :: ierr
557 type(kim_collections_type),
pointer :: collections
559 type(c_ptr) pfile_name, pfile_raw_data, pfile_string
561 call c_f_pointer(collections_handle%p, collections)
567 available_as_string, &
578 collections_handle, index, file_name, file_raw_data, file_string, ierr)
579 use kim_interoperable_types_module,
only: kim_collections_type
580 use kim_convert_string_module,
only: kim_convert_c_char_ptr_to_string
584 collections, index, file_name, file_length, file_raw_data, &
585 available_as_string, file_string) &
586 bind(c, name="KIM_Collections_GetItemMetadataFile_fortran")
587 use,
intrinsic :: iso_c_binding
588 use kim_interoperable_types_module,
only: kim_collections_type
590 type(kim_collections_type),
intent(in) :: collections
591 integer(c_int),
intent(in),
value :: index
592 type(c_ptr),
intent(out) :: file_name
593 integer(c_long),
intent(out) :: file_length
594 type(c_ptr),
intent(out) :: file_raw_data
595 integer(c_int),
intent(out) :: available_as_string
596 type(c_ptr),
intent(out) :: file_string
600 integer(c_int),
intent(in) :: index
601 character(len=*, kind=c_char),
intent(out) :: file_name
602 integer(c_signed_char),
intent(out) :: file_raw_data(:)
603 character(len=*, kind=c_char),
intent(out) :: file_string
604 integer(c_int),
intent(out) :: ierr
605 type(kim_collections_type),
pointer :: collections
607 integer(c_long) file_length
608 integer(c_int) available_as_string
609 type(c_ptr) pfile_name, pfile_raw_data, pfile_string
610 integer(c_signed_char),
pointer :: file_raw_data_fpointer(:)
612 call c_f_pointer(collections_handle%p, collections)
618 available_as_string, &
621 if (
size(file_raw_data) < file_length)
then
625 if (available_as_string == 1)
then
626 if (len(file_string) < file_length)
then
632 call kim_convert_c_char_ptr_to_string(pfile_name, file_name)
633 if (c_associated(pfile_raw_data))
then
634 call c_f_pointer(pfile_raw_data, file_raw_data_fpointer, [file_length])
636 nullify (file_raw_data_fpointer)
638 file_raw_data = file_raw_data_fpointer(1:file_length)
640 if (available_as_string == 1)
then
641 call kim_convert_c_char_ptr_to_string(pfile_string, file_string)
653 collections_handle, item_type, extent, ierr)
654 use kim_interoperable_types_module,
only: kim_collections_type
658 integer(c_int) recursive function cache_list_of_item_names_by_type( &
659 collections, item_type, extent) &
660 bind(c, name="KIM_Collections_CacheListOfItemNamesByType")
661 use,
intrinsic :: iso_c_binding
662 use kim_interoperable_types_module,
only: kim_collections_type
666 type(kim_collections_type),
intent(in) :: collections
667 type(kim_collection_item_type_type),
intent(in),
value :: item_type
668 integer(c_int),
intent(out) :: extent
671 type(kim_collections_handle_type),
intent(in) :: collections_handle
672 type(kim_collection_item_type_type),
intent(in) :: item_type
673 integer(c_int),
intent(out) :: extent
674 integer(c_int),
intent(out) :: ierr
675 type(kim_collections_type),
pointer :: collections
677 call c_f_pointer(collections_handle%p, collections)
687 collections_handle, index, item_name, ierr)
688 use kim_interoperable_types_module,
only: kim_collections_type
689 use kim_convert_string_module,
only: kim_convert_c_char_ptr_to_string
692 integer(c_int) recursive function get_item_name_by_type( &
693 collections, index, item_name) &
694 bind(c, name="KIM_Collections_GetItemNameByType")
695 use,
intrinsic :: iso_c_binding
696 use kim_interoperable_types_module,
only: kim_collections_type
698 type(kim_collections_type),
intent(in) :: collections
699 integer(c_int),
intent(in),
value :: index
700 type(c_ptr),
intent(out) :: item_name
703 type(kim_collections_handle_type),
intent(in) :: collections_handle
704 integer(c_int),
intent(in) :: index
705 character(len=*, kind=c_char),
intent(out) :: item_name
706 integer(c_int),
intent(out) :: ierr
707 type(kim_collections_type),
pointer :: collections
709 type(c_ptr) pitem_name
711 call c_f_pointer(collections_handle%p, collections)
713 call kim_convert_c_char_ptr_to_string(pitem_name, item_name)
722 recursive subroutine &
724 collections_handle, collection, item_type, extent, ierr)
725 use kim_interoperable_types_module,
only: kim_collections_type
730 integer(c_int) recursive function &
731 cache_list_of_item_names_by_collection_and_type( &
732 collections, collection, item_type, extent) &
733 bind(c, name="KIM_Collections_CacheListOfItemNamesByCollectionAndType")
734 use,
intrinsic :: iso_c_binding
735 use kim_interoperable_types_module,
only: kim_collections_type
740 type(kim_collections_type),
intent(in) :: collections
741 type(kim_collection_type),
intent(in),
value :: collection
742 type(kim_collection_item_type_type),
intent(in),
value :: item_type
743 integer(c_int),
intent(out) :: extent
746 type(kim_collections_handle_type),
intent(in) :: collections_handle
747 type(kim_collection_type),
intent(in) :: collection
748 type(kim_collection_item_type_type),
intent(in) :: item_type
749 integer(c_int),
intent(out) :: extent
750 integer(c_int),
intent(out) :: ierr
751 type(kim_collections_type),
pointer :: collections
753 call c_f_pointer(collections_handle%p, collections)
767 collections_handle, index, item_name, ierr)
768 use kim_interoperable_types_module,
only: kim_collections_type
769 use kim_convert_string_module,
only: kim_convert_c_char_ptr_to_string
772 integer(c_int) recursive function get_item_name_by_collection_and_type( &
773 collections, index, item_name) &
774 bind(c, name="KIM_Collections_GetItemNameByCollectionAndType")
775 use,
intrinsic :: iso_c_binding
776 use kim_interoperable_types_module,
only: kim_collections_type
778 type(kim_collections_type),
intent(in) :: collections
779 integer(c_int),
intent(in),
value :: index
780 type(c_ptr),
intent(out) :: item_name
783 type(kim_collections_handle_type),
intent(in) :: collections_handle
784 integer(c_int),
intent(in) :: index
785 character(len=*, kind=c_char),
intent(out) :: item_name
786 integer(c_int),
intent(out) :: ierr
787 type(kim_collections_type),
pointer :: collections
789 type(c_ptr) pitem_name
791 call c_f_pointer(collections_handle%p, collections)
794 call kim_convert_c_char_ptr_to_string(pitem_name, item_name)
804 recursive subroutine &
806 collections_handle, collection, item_type, item_name, file_name, ierr)
807 use kim_interoperable_types_module,
only: kim_collections_type
808 use kim_convert_string_module,
only: kim_convert_c_char_ptr_to_string
813 integer(c_int) recursive function &
814 get_item_library_file_name_by_coll_and_type( &
815 collections, collection, item_type, item_name, file_name) &
817 name=
"KIM_Collections_GetItemLibraryFileNameByCollectionAndType")
818 use,
intrinsic :: iso_c_binding
819 use kim_interoperable_types_module,
only: kim_collections_type
824 type(kim_collections_type),
intent(in) :: collections
825 type(kim_collection_type),
intent(in),
value :: collection
826 type(kim_collection_item_type_type),
intent(in),
value :: item_type
827 character(c_char),
intent(in) :: item_name(*)
828 type(c_ptr),
intent(out) :: file_name
831 type(kim_collections_handle_type),
intent(in) :: collections_handle
832 type(kim_collection_type),
intent(in) :: collection
833 type(kim_collection_item_type_type),
intent(in) :: item_type
834 character(len=*, kind=c_char),
intent(in) :: item_name
835 character(len=*, kind=c_char),
intent(out) :: file_name
836 integer(c_int),
intent(out) :: ierr
837 type(kim_collections_type),
pointer :: collections
839 type(c_ptr) pfile_name
841 call c_f_pointer(collections_handle%p, collections)
846 trim(item_name)//c_null_char, &
848 call kim_convert_c_char_ptr_to_string(pfile_name, file_name)
858 recursive subroutine &
860 collections_handle, collection, item_type, item_name, extent, ierr)
861 use kim_interoperable_types_module,
only: kim_collections_type
866 integer(c_int) recursive function &
867 cache_list_of_item_metadata_files_by_coll_and_type( &
868 collections, collection, item_type, item_name, extent) &
871 "KIM_Collections_CacheListOfItemMetadataFilesByCollectionAndType")
872 use,
intrinsic :: iso_c_binding
873 use kim_interoperable_types_module,
only: kim_collections_type
878 type(kim_collections_type),
intent(in) :: collections
879 type(kim_collection_type),
intent(in),
value :: collection
880 type(kim_collection_item_type_type),
intent(in),
value :: item_type
881 character(c_char),
intent(in) :: item_name(*)
882 integer(c_int),
intent(out) :: extent
885 type(kim_collections_handle_type),
intent(in) :: collections_handle
886 type(kim_collection_type),
intent(in) :: collection
887 type(kim_collection_item_type_type),
intent(in) :: item_type
888 character(len=*, kind=c_char),
intent(in) :: item_name
889 integer(c_int),
intent(out) :: extent
890 integer(c_int),
intent(out) :: ierr
891 type(kim_collections_type),
pointer :: collections
893 call c_f_pointer(collections_handle%p, collections)
898 trim(item_name)//c_null_char, &
908 recursive subroutine &
910 collections_handle, index, file_length, available_as_string, ierr)
911 use kim_interoperable_types_module,
only: kim_collections_type
914 integer(c_int) recursive function &
915 get_item_metadata_file_by_coll_and_type( &
916 collections, index, &
920 available_as_string, &
924 "KIM_Collections_GetItemMetadataFileByCollectionAndType_fortran")
925 use,
intrinsic :: iso_c_binding
926 use kim_interoperable_types_module,
only: kim_collections_type
928 type(kim_collections_type),
intent(in) :: collections
929 integer(c_int),
intent(in),
value :: index
930 type(c_ptr),
intent(out) :: file_name
931 integer(c_long),
intent(out) :: file_length
932 type(c_ptr),
intent(out) :: file_raw_data
933 integer(c_int),
intent(out) :: available_as_string
934 type(c_ptr),
intent(out) :: file_string
937 type(kim_collections_handle_type),
intent(in) :: collections_handle
938 integer(c_int),
intent(in),
value :: index
939 integer(c_long),
intent(out) :: file_length
940 integer(c_int),
intent(out) :: available_as_string
941 integer(c_int),
intent(out) :: ierr
942 type(kim_collections_type),
pointer :: collections
944 type(c_ptr) pfile_name, pfile_raw_data, pfile_string
946 call c_f_pointer(collections_handle%p, collections)
952 available_as_string, &
962 recursive subroutine &
964 collections_handle, index, file_name, file_raw_data, file_string, ierr)
965 use kim_interoperable_types_module,
only: kim_collections_type
966 use kim_convert_string_module,
only: kim_convert_c_char_ptr_to_string
969 integer(c_int) recursive function &
975 available_as_string, &
979 "KIM_Collections_GetItemMetadataFileByCollectionAndType_fortran")
980 use,
intrinsic :: iso_c_binding
981 use kim_interoperable_types_module,
only: kim_collections_type
983 type(kim_collections_type),
intent(in) :: collections
984 integer(c_int),
intent(in),
value :: index
985 type(c_ptr),
intent(out) :: file_name
986 integer(c_long),
intent(out) :: file_length
987 type(c_ptr),
intent(out) :: file_raw_data
988 integer(c_int),
intent(out) :: available_as_string
989 type(c_ptr),
intent(out) :: file_string
993 integer(c_int),
intent(in) :: index
994 character(len=*, kind=c_char),
intent(out) :: file_name
995 integer(c_signed_char),
intent(out) :: file_raw_data(:)
996 character(len=*, kind=c_char),
intent(out) :: file_string
997 integer(c_int),
intent(out) :: ierr
998 type(kim_collections_type),
pointer :: collections
1000 integer(c_long) file_length
1001 integer(c_int) available_as_string
1002 type(c_ptr) pfile_name, pfile_raw_data, pfile_string
1003 integer(c_signed_char),
pointer :: file_raw_data_fpointer(:)
1005 call c_f_pointer(collections_handle%p, collections)
1011 available_as_string, &
1014 if (
size(file_raw_data) < file_length)
then
1018 if (available_as_string == 1)
then
1019 if (len(file_string) < file_length)
then
1025 call kim_convert_c_char_ptr_to_string(pfile_name, file_name)
1026 if (c_associated(pfile_raw_data))
then
1027 call c_f_pointer(pfile_raw_data, file_raw_data_fpointer, [file_length])
1029 nullify (file_raw_data_fpointer)
1031 file_raw_data = file_raw_data_fpointer(1:file_length)
1033 if (available_as_string == 1)
then
1034 call kim_convert_c_char_ptr_to_string(pfile_string, file_string)
1046 collections_handle, project_name, sem_ver)
1047 use kim_interoperable_types_module,
only: kim_collections_type
1048 use kim_convert_string_module,
only: kim_convert_c_char_ptr_to_string
1052 project_name, sem_ver) &
1053 bind(c, name="KIM_Collections_GetProjectNameAndSemVer")
1054 use,
intrinsic :: iso_c_binding
1055 use kim_interoperable_types_module,
only: kim_collections_type
1057 type(kim_collections_type),
intent(in) :: collections
1058 type(c_ptr),
intent(out) :: project_name
1059 type(c_ptr),
intent(out) :: sem_ver
1062 type(kim_collections_handle_type),
intent(in) :: collections_handle
1063 character(len=*, kind=c_char),
intent(out) :: project_name
1064 character(len=*, kind=c_char),
intent(out) :: sem_ver
1065 type(kim_collections_type),
pointer :: collections
1067 type(c_ptr) pproject_name, psem_ver
1069 call c_f_pointer(collections_handle%p, collections)
1071 call kim_convert_c_char_ptr_to_string(pproject_name, project_name)
1072 call kim_convert_c_char_ptr_to_string(psem_ver, sem_ver)
1082 collections_handle, item_type, name, ierr)
1083 use kim_interoperable_types_module,
only: kim_collections_type
1084 use kim_convert_string_module,
only: kim_convert_c_char_ptr_to_string
1088 integer(c_int) recursive function get_environment_variable_name( &
1089 collections, item_type, name) &
1090 bind(c, name="KIM_Collections_GetEnvironmentVariableName")
1091 use,
intrinsic :: iso_c_binding
1092 use kim_interoperable_types_module,
only: kim_collections_type
1096 type(kim_collections_type),
intent(in) :: collections
1097 type(kim_collection_item_type_type),
intent(in),
value :: item_type
1098 type(c_ptr),
intent(out) :: name
1101 type(kim_collections_handle_type),
intent(in) :: collections_handle
1102 type(kim_collection_item_type_type),
intent(in) :: item_type
1103 character(len=*, kind=c_char),
intent(out) :: name
1104 integer(c_int),
intent(out) :: ierr
1105 type(kim_collections_type),
pointer :: collections
1109 call c_f_pointer(collections_handle%p, collections)
1111 call kim_convert_c_char_ptr_to_string(pname, name)
1120 recursive subroutine &
1122 collections_handle, name,
value)
1123 use kim_interoperable_types_module,
only: kim_collections_type
1124 use kim_convert_string_module,
only: kim_convert_c_char_ptr_to_string
1128 collections, name, value) &
1129 bind(c, name="KIM_Collections_GetConfigurationFileEnvironmentVariable")
1130 use,
intrinsic :: iso_c_binding
1131 use kim_interoperable_types_module,
only: kim_collections_type
1133 type(kim_collections_type),
intent(in) :: collections
1134 type(c_ptr),
intent(out) :: name
1135 type(c_ptr),
intent(out) :: value
1138 type(kim_collections_handle_type),
intent(in) :: collections_handle
1139 character(len=*, kind=c_char),
intent(out) :: name
1140 character(len=*, kind=c_char),
intent(out) :: value
1141 type(kim_collections_type),
pointer :: collections
1143 type(c_ptr) pname, pvalue
1145 call c_f_pointer(collections_handle%p, collections)
1147 call kim_convert_c_char_ptr_to_string(pname, name)
1148 call kim_convert_c_char_ptr_to_string(pvalue,
value)
1158 collections_handle, file_name)
1159 use kim_interoperable_types_module,
only: kim_collections_type
1160 use kim_convert_string_module,
only: kim_convert_c_char_ptr_to_string
1164 bind(c, name="KIM_Collections_GetConfigurationFileName")
1165 use,
intrinsic :: iso_c_binding
1166 use kim_interoperable_types_module,
only: kim_collections_type
1168 type(kim_collections_type),
intent(in) :: collections
1169 type(c_ptr),
intent(out) :: file_name
1172 type(kim_collections_handle_type),
intent(in) :: collections_handle
1173 character(len=*, kind=c_char),
intent(out) :: file_name
1174 type(kim_collections_type),
pointer :: collections
1176 type(c_ptr) pfile_name
1178 call c_f_pointer(collections_handle%p, collections)
1180 call kim_convert_c_char_ptr_to_string(pfile_name, file_name)
1190 collections_handle, collection, item_type, extent, ierr)
1191 use kim_interoperable_types_module,
only: kim_collections_type
1196 integer(c_int) recursive function cache_list_of_directory_names( &
1197 collections, collection, item_type, extent) &
1198 bind(c, name="KIM_Collections_CacheListOfDirectoryNames")
1199 use,
intrinsic :: iso_c_binding
1200 use kim_interoperable_types_module,
only: kim_collections_type
1205 type(kim_collections_type),
intent(in) :: collections
1206 type(kim_collection_type),
intent(in),
value :: collection
1207 type(kim_collection_item_type_type),
intent(in),
value :: item_type
1208 integer(c_int),
intent(out) :: extent
1211 type(kim_collections_handle_type),
intent(in) :: collections_handle
1212 type(kim_collection_type),
intent(in) :: collection
1213 type(kim_collection_item_type_type),
intent(in) :: item_type
1214 integer(c_int),
intent(out) :: extent
1215 integer(c_int),
intent(out) :: ierr
1216 type(kim_collections_type),
pointer :: collections
1218 call c_f_pointer(collections_handle%p, collections)
1232 use kim_interoperable_types_module,
only: kim_collections_type
1233 use kim_convert_string_module,
only: kim_convert_c_char_ptr_to_string
1236 integer(c_int) recursive function get_directory_name(collections, index, &
1238 bind(c, name="KIM_Collections_GetDirectoryName")
1239 use,
intrinsic :: iso_c_binding
1240 use kim_interoperable_types_module,
only: kim_collections_type
1242 type(kim_collections_type),
intent(in) :: collections
1243 integer(c_int),
intent(in),
value :: index
1244 type(c_ptr),
intent(out) :: directory_name
1247 type(kim_collections_handle_type),
intent(in) :: collections_handle
1248 integer(c_int),
intent(in) :: index
1249 character(len=*, kind=c_char),
intent(out) :: directory_name
1250 integer(c_int),
intent(out) :: ierr
1251 type(kim_collections_type),
pointer :: collections
1253 type(c_ptr) pdirectory_name
1255 call c_f_pointer(collections_handle%p, collections)
1257 call kim_convert_c_char_ptr_to_string(pdirectory_name, directory_name)
1266 use kim_interoperable_types_module,
only: kim_collections_type
1270 bind(c, name="KIM_Collections_SetLogID")
1271 use,
intrinsic :: iso_c_binding
1272 use kim_interoperable_types_module,
only: kim_collections_type
1274 type(kim_collections_type),
intent(in) :: collections
1275 character(c_char),
intent(in) :: log_id(*)
1278 type(kim_collections_handle_type),
intent(in) :: collections_handle
1279 character(len=*, kind=c_char),
intent(in) :: log_id
1280 type(kim_collections_type),
pointer :: collections
1282 call c_f_pointer(collections_handle%p, collections)
1283 call set_log_id(collections, trim(log_id)//c_null_char)
1294 use kim_interoperable_types_module,
only: kim_collections_type
1298 bind(c, name="KIM_Collections_PushLogVerbosity")
1299 use,
intrinsic :: iso_c_binding
1301 use kim_interoperable_types_module,
only: kim_collections_type
1303 type(kim_collections_type),
intent(in) :: collections
1304 type(kim_log_verbosity_type),
intent(in),
value :: log_verbosity
1307 type(kim_collections_handle_type),
intent(in) :: collections_handle
1308 type(kim_log_verbosity_type),
intent(in) :: log_verbosity
1309 type(kim_collections_type),
pointer :: collections
1311 call c_f_pointer(collections_handle%p, collections)
1322 use kim_interoperable_types_module,
only: kim_collections_type
1326 bind(c, name="KIM_Collections_PopLogVerbosity")
1327 use,
intrinsic :: iso_c_binding
1329 use kim_interoperable_types_module,
only: kim_collections_type
1331 type(kim_collections_type),
intent(in) :: collections
1334 type(kim_collections_handle_type),
intent(in) :: collections_handle
1335 type(kim_collections_type),
pointer :: collections
1337 call c_f_pointer(collections_handle%p, collections)
Cache a list of directory names where a specific KIM API collection stores library files for a specif...
Cache a list of all item names of a specific type in a specific collection.
Cache a list of all item names of a specific type in the KIM API collections.
Get the name and value of the environment variable that stores the name of the KIM API user configura...
Get the absolute file and path name of the KIM API user configuration file.
Get the name of a directory from the cached list.
Get the names of environment variables that store configuration settings for the KIM::COLLECTION::env...
Get the item's library file name and its KIM::Collection.
KIM::Collections::GetItemLibraryFileNameByCollectionAndType
Get the name of an item from the cached list.
Get the name of an item from the cached list.
Get the KIM::CollectionItemType of the item in the KIM API collections with a specific name.
Get the KIM API project name and full Semantic Version string.
Pop a LogVerbosity from the Collections object's Log object verbosity stack.
Push a new LogVerbosity onto the Collections object's Log object verbosity stack.
Set the identity of the Log object associated with the Collections object.
An Extensible Enumeration for the CollectionItemType's supported by the KIM API.
An Extensible Enumeration for the Collection's supported by the KIM API.
Provides the interface to the KIM API Collections and is meant to be used by simulators.
recursive subroutine kim_collections_get_project_name_and_sem_ver(collections_handle, project_name, sem_ver)
Get the KIM API project name and full Semantic Version string.
recursive subroutine kim_collections_get_item_metadata_file_values(collections_handle, index, file_name, file_raw_data, file_string, ierr)
Get the item's metadata file values.
recursive subroutine kim_collections_get_item_name_by_collection_and_type(collections_handle, index, item_name, ierr)
Get the name of an item from the cached list.
recursive subroutine kim_collections_cache_list_of_item_names_by_collection_and_type(collections_handle, collection, item_type, extent, ierr)
Cache a list of all item names of a specific type in a specific collection.
recursive subroutine kim_collections_get_configuration_file_name(collections_handle, file_name)
Get the absolute file and path name of the KIM API user configuration file.
recursive subroutine kim_collections_get_environment_variable_name(collections_handle, item_type, name, ierr)
Get the names of environment variables that store configuration settings for the KIM::COLLECTION::env...
recursive subroutine kim_collections_get_item_metadata_file_length_by_coll_and_type(collections_handle, index, file_length, available_as_string, ierr)
Get the name and content of one of an item's metadata files.
recursive subroutine kim_collections_cache_list_of_directory_names(collections_handle, collection, item_type, extent, ierr)
Cache a list of directory names where a specific KIM API collection stores library files for a specif...
recursive subroutine kim_collections_cache_list_of_item_metadata_files(collections_handle, item_type, item_name, extent, ierr)
Cache a list of an item's metadata files.
recursive subroutine kim_collections_get_item_library_file_name_and_collection(collections_handle, item_type, item_name, file_name, collection, ierr)
Get the item's library file name and its KIM::Collection.
recursive subroutine kim_collections_get_item_metadata_file_length(collections_handle, index, file_length, available_as_string, ierr)
Get item metadata file length and determine if the file is available as a string.
recursive subroutine kim_collections_push_log_verbosity(collections_handle, log_verbosity)
Push a new LogVerbosity onto the Collections object's Log object verbosity stack.
recursive subroutine, public kim_collections_destroy(collections_handle)
Destroy a previously Collections::Create'd object.
recursive subroutine kim_collections_get_item_metadata_file_values_by_coll_and_type(collections_handle, index, file_name, file_raw_data, file_string, ierr)
Get the item's metadata file values.
recursive subroutine kim_colls_cache_list_of_item_metadata_files_by_coll_and_type(collections_handle, collection, item_type, item_name, extent, ierr)
KIM::Collections::CacheListOfItemMetadataFilesByCollectionAndType
recursive subroutine kim_collections_get_item_name_by_type(collections_handle, index, item_name, ierr)
Get the name of an item from the cached list.
recursive subroutine kim_collections_get_configuration_file_environment_variable(collections_handle, name, value)
Get the name and value of the environment variable that stores the name of the KIM API user configura...
recursive subroutine, public kim_collections_create(collections_handle, ierr)
Create a new KIM API Collections object.
type(kim_collections_handle_type), save, public, protected kim_collections_null_handle
NULL handle for use in comparisons.
recursive subroutine kim_collections_get_item_library_file_name_by_coll_and_type(collections_handle, collection, item_type, item_name, file_name, ierr)
KIM::Collections::GetItemLibraryFileNameByCollectionAndType
recursive subroutine kim_collections_cache_list_of_item_names_by_type(collections_handle, item_type, extent, ierr)
Cache a list of all item names of a specific type in the KIM API collections.
recursive subroutine kim_collections_pop_log_verbosity(collections_handle)
Pop a LogVerbosity from the Collections object's Log object verbosity stack.
recursive subroutine kim_collections_get_directory_name(collections_handle, index, directory_name, ierr)
Get the name of a directory from the cached list.
recursive subroutine kim_collections_set_log_id(collections_handle, log_id)
Set the identity of the Log object associated with the Collections object.
An Extensible Enumeration for the LogVerbosity's supported by the KIM API.
An Extensible Enumeration for the CollectionItemType's supported by the KIM API.
An Extensible Enumeration for the Collection's supported by the KIM API.
Provides the interface to the KIM API Collections and is meant to be used by simulators.
An Extensible Enumeration for the LogVerbosity's supported by the KIM API.