Gets a specific string element out of the list, stack, queue or map with the corresponding key.
More...
|
character(len=string_length) function | list_get_string (specificlist, i) |
| Retrieves the element at index i from the list. More...
|
|
character(len=string_length) function | stack_get_string (specificstack, i) |
| Gets a specific element from the stack at index specified. More...
|
|
character(len=string_length) function | queue_get_string (specificqueue, i) |
| Returns a specific queue element at an index. More...
|
|
character(len=string_length) function | map_get_string (specificmap, key) |
| Gets a specific element out of the map with the corresponding key. More...
|
|
character(len=string_length) function | hashmap_get_string (specificmap, key) |
| Gets a specific element out of the hashmap with the corresponding key. More...
|
|
character(len=string_length) function | hashset_get_string (specificset, index) |
| Retrieves the key at index i from the set or empty string if index < list size. More...
|
|
character(len=string_length) function | mapentry_get_string (mapentry_item) |
| Retrieves the string value from a map entry. More...
|
|
Gets a specific string element out of the list, stack, queue or map with the corresponding key.
This has a time complexity of O(n)
- Parameters
-
collection | The specific list, stack, queue or map involved |
key | String look up key |
- Returns
- String value associated with the key or raises an error if none exists
Definition at line 388 of file collections.F90.
◆ hashmap_get_string()
character(len=string_length) function collections_mod::c_get_string::hashmap_get_string |
( |
type(hashmap_type), intent(inout) |
specificmap, |
|
|
character(len=*), intent(in) |
key |
|
) |
| |
|
private |
Gets a specific element out of the hashmap with the corresponding key.
Do not call directly from external module, this is called via the appropriate interface
- Parameters
-
specificmap | The specific hashmap involved |
key | Look up key |
- Returns
- String value associated with the key or raises an error if none is found
Definition at line 1713 of file collections.F90.
1714 type(hashmap_type),
intent(inout) :: specificmap
1715 character(len=*),
intent(in) :: key
1716 character(len=STRING_LENGTH) :: hashmap_get_string
1718 class(*),
pointer :: generic
1720 generic=>hashmap_get_generic(specificmap, key)
1721 if (.not.
associated(generic))
call log_log(
log_error,
"Can not find string entry with key '"//trim(key)//
"'")
1722 hashmap_get_string=conv_to_string(generic, .false., string_length)
◆ hashset_get_string()
character(len=string_length) function collections_mod::c_get_string::hashset_get_string |
( |
type(hashset_type), intent(inout) |
specificset, |
|
|
integer, intent(in) |
index |
|
) |
| |
|
private |
Retrieves the key at index i from the set or empty string if index < list size.
Do not call directly from external module, this is called via the appropriate interface
- Parameters
-
specificset | The specific set involved |
i | Index to look up |
- Returns
- The corresponding key at this location or empty string if none is found
Definition at line 2078 of file collections.F90.
2079 type(hashset_type),
intent(inout) :: specificset
2080 integer,
intent(in) :: index
2081 class(*),
pointer :: generic
2083 integer :: i, current_size, prev
2085 hashset_get_string=
""
2086 if (.not.
associated(specificset%set_ds) .or. index .gt. specificset%size)
return
2091 current_size=current_size+list_size(specificset%set_ds(i))
2092 if (current_size .ge. index)
then
2093 generic=>list_get_generic(specificset%set_ds(i), index-prev)
2094 if (
associated(generic))
then
2095 select type (generic)
2096 type is (setnode_type)
2097 hashset_get_string=generic%key
2101 call log_log(
log_error,
"Can not find hashset entry at index "//trim(conv_to_string(index)))
◆ list_get_string()
character(len=string_length) function collections_mod::c_get_string::list_get_string |
( |
type(list_type), intent(inout) |
specificlist, |
|
|
integer, intent(in) |
i |
|
) |
| |
|
private |
Retrieves the element at index i from the list.
Do not call directly from external module, this is called via the appropriate interface
- Parameters
-
specificlist | The specific list involved |
i | Index to look up |
- Returns
- String data in the list or raises an error if none is found
Definition at line 3056 of file collections.F90.
3057 type(list_type),
intent(inout) :: specificlist
3058 integer,
intent(in) :: i
3059 character(len=STRING_LENGTH) :: list_get_string
3061 class(*),
pointer :: generic
3063 generic=>list_get_generic(specificlist, i)
3064 if (.not.
associated(generic))
call log_log(
log_error,
"Can not get string from list at index "//trim(conv_to_string(i)))
3065 list_get_string=conv_to_string(generic, .false., string_length)
◆ map_get_string()
character(len=string_length) function collections_mod::c_get_string::map_get_string |
( |
type(map_type), intent(inout) |
specificmap, |
|
|
character(len=*), intent(in) |
key |
|
) |
| |
|
private |
Gets a specific element out of the map with the corresponding key.
Do not call directly from external module, this is called via the appropriate interface
- Parameters
-
specificmap | The specific map involved |
key | Look up key |
- Returns
- String value associated with the key or raises an error if none is found
Definition at line 1075 of file collections.F90.
1076 type(map_type),
intent(inout) :: specificmap
1077 character(len=*),
intent(in) :: key
1078 character(len=STRING_LENGTH) :: map_get_string
1080 class(*),
pointer :: generic
1082 generic=>map_get_generic(specificmap, key)
1083 if (.not.
associated(generic))
call log_log(
log_error,
"Can not find string entry with key '"//trim(key)//
"'")
1084 map_get_string=conv_to_string(generic, .false., string_length)
◆ mapentry_get_string()
character(len=string_length) function collections_mod::c_get_string::mapentry_get_string |
( |
type(mapentry_type), intent(in) |
mapentry_item | ) |
|
|
private |
Retrieves the string value from a map entry.
- Parameters
-
mapentry_item | The map entry to retrieve the string value from |
Definition at line 3333 of file collections.F90.
3334 type(mapentry_type),
intent(in) :: mapentry_item
3335 character(len=STRING_LENGTH) :: mapentry_get_string
3337 class(*),
pointer :: generic
3339 generic=>mapentry_item%value
3340 if (.not.
associated(generic))
call log_log(
log_error,
"Can not get string from map entry")
3341 mapentry_get_string=conv_to_string(generic, .false., string_length)
◆ queue_get_string()
character(len=string_length) function collections_mod::c_get_string::queue_get_string |
( |
type(queue_type), intent(inout) |
specificqueue, |
|
|
integer, intent(in) |
i |
|
) |
| |
|
private |
Returns a specific queue element at an index.
Do not call directly from external module, this is called via the appropriate interface
- Parameters
-
specificqueue | The specific queue involved |
i | The index to look up |
- Returns
- String element at i or raises an error if none is found
Definition at line 2662 of file collections.F90.
2663 type(queue_type),
intent(inout) :: specificqueue
2664 integer,
intent(in) :: i
2665 character(len=STRING_LENGTH) :: queue_get_string
2667 class(*),
pointer :: generic
2669 generic=>queue_get_generic(specificqueue, i)
2670 if (.not.
associated(generic))
call log_log(
log_error,
"Can not get string from queue at index "//trim(conv_to_string(i)))
2671 queue_get_string=conv_to_string(generic, .false., string_length)
◆ stack_get_string()
character(len=string_length) function collections_mod::c_get_string::stack_get_string |
( |
type(stack_type), intent(inout) |
specificstack, |
|
|
integer, intent(in) |
i |
|
) |
| |
|
private |
Gets a specific element from the stack at index specified.
Do not call directly from external module, this is called via the appropriate interface
- Parameters
-
specificstack | The specific stack involved |
i | The index to retrieve the element at |
- Returns
- String data or raises an error if none is found
Definition at line 2366 of file collections.F90.
2367 type(stack_type),
intent(inout) :: specificstack
2368 integer,
intent(in) :: i
2369 character(len=STRING_LENGTH) :: stack_get_string
2371 class(*),
pointer :: generic
2373 generic=>stack_get_generic(specificstack, i)
2374 if (.not.
associated(generic))
call log_log(
log_error,
"Can not get string from stack at index "//trim(conv_to_string(i)))
2375 stack_get_string=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...