Retrieves the string value held at the specific map index or null if index > map elements.
More...
|
character(len=string_length) function | map_string_at (specificmap, i) |
| Retrieves the string value held at the specific map index. More...
|
|
character(len=string_length) function | hashmap_string_at (specificmap, i) |
| Retrieves the value held at the specific hashmap index. Note that this is an expensive operation has it has to potentially process all internal hashed lists so avoid if can. More...
|
|
Retrieves the string value held at the specific map index or null if index > map elements.
This has a time complexity of O(n)
- Parameters
-
collection | The specific map involved |
index | The index to get value from |
- Returns
- String value or raises an error if none is found
Definition at line 487 of file collections.F90.
◆ hashmap_string_at()
character(len=string_length) function collections_mod::c_string_at::hashmap_string_at |
( |
type(hashmap_type), intent(inout) |
specificmap, |
|
|
integer, intent(in) |
i |
|
) |
| |
|
private |
Retrieves the value held at the specific hashmap index. Note that this is an expensive operation has it has to potentially process all internal hashed lists so avoid if can.
Do not call directly from external module, this is called via the appropriate interface
- Parameters
-
specificmap | The specific hashmap involved |
i | Index to get value from |
- Returns
- String value or raises an error if none is found
Definition at line 1464 of file collections.F90.
1465 type(hashmap_type),
intent(inout) :: specificmap
1466 integer,
intent(in) :: i
1467 character(len=STRING_LENGTH) :: hashmap_string_at
1469 class(*),
pointer :: generic
1471 generic=>hashmap_generic_at(specificmap, i)
1472 if (.not.
associated(generic))
call log_log(
log_error,
"Can not find string at "//trim(conv_to_string(i)))
1473 hashmap_string_at=conv_to_string(generic, .false., string_length)
◆ map_string_at()
character(len=string_length) function collections_mod::c_string_at::map_string_at |
( |
type(map_type), intent(inout) |
specificmap, |
|
|
integer, intent(in) |
i |
|
) |
| |
|
private |
Retrieves the string value held at the specific map index.
Do not call directly from external module, this is called via the appropriate interface
- Parameters
-
specificmap | The specific map involved |
i | Index to get value from |
- Returns
- String value or raises an error if none is found
Definition at line 823 of file collections.F90.
824 type(map_type),
intent(inout) :: specificmap
825 integer,
intent(in) :: i
826 character(len=STRING_LENGTH) :: map_string_at
828 class(*),
pointer :: generic
830 generic=>map_generic_at(specificmap, i)
831 if (.not.
associated(generic))
call log_log(
log_error,
"Can not find string at "//trim(conv_to_string(i)))
832 map_string_at=conv_to_string(generic, .false., string_length)
The documentation for this interface was generated from the following file:
subroutine, public log_log(level, message, str)
Logs a message at the specified level. If the level is above the current level then the message is ig...