Returns a pointer to an array of all key/value-items stored in the dictionary. Caution: The caller is responsible for deallocating targeted array after usage.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(dict_i4tuple_callstat_type), | intent(inout) | :: | dict |
FUNCTION dict_i4tuple_callstat_items(dict) RESULT(items) # 338 "/__w/dbcsr/dbcsr/src/core/dbcsr_dict.F" !! Returns a pointer to an array of all key/value-items stored in the dictionary. !! Caution: The caller is responsible for deallocating targeted array after usage. TYPE(dict_i4tuple_callstat_type), intent(inout) :: dict # 341 "/__w/dbcsr/dbcsr/src/core/dbcsr_dict.F" TYPE(dict_i4tuple_callstat_item_type), dimension(:), POINTER :: items # 342 "/__w/dbcsr/dbcsr/src/core/dbcsr_dict.F" TYPE(private_item_type_i4tuple_callstat), POINTER :: item # 344 "/__w/dbcsr/dbcsr/src/core/dbcsr_dict.F" INTEGER :: i, j IF (.not. ASSOCIATED(dict%buckets)) & DBCSR_ABORT("dict_i4tuple_callstat_items: dictionary is not initialized.") # 348 "/__w/dbcsr/dbcsr/src/core/dbcsr_dict.F" allocate (items(dict%size)) j = 1 do i = 1, size(dict%buckets) item => dict%buckets(i)%p do while (ASSOCIATED(item)) items(j)%key =item%key # 355 "/__w/dbcsr/dbcsr/src/core/dbcsr_dict.F" items(j)%value =>item%value # 356 "/__w/dbcsr/dbcsr/src/core/dbcsr_dict.F" j = j + 1 item => item%next end do end do IF (j /= dict%size + 1) & DBCSR_ABORT("dict_i4tuple_callstat_items: assertion failed!") # 363 "/__w/dbcsr/dbcsr/src/core/dbcsr_dict.F" END FUNCTION dict_i4tuple_callstat_items