Gets a specific logical element out of the list, stack, queue or map with the corresponding key.
More...
Gets a specific logical 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
- Logical value associated with the key or raises an error if none exists
Definition at line 409 of file collections.F90.
◆ hashmap_get_logical()
logical function collections_mod::c_get_logical::hashmap_get_logical |
( |
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
- Logical value associated with the key or raises an error if none is found
Definition at line 1756 of file collections.F90.
1757 type(hashmap_type),
intent(inout) :: specificmap
1758 character(len=*),
intent(in) :: key
1759 logical :: hashmap_get_logical
1761 class(*),
pointer :: generic
1763 generic=>hashmap_get_generic(specificmap, key)
1764 if (.not.
associated(generic))
call log_log(
log_error,
"Can not find logical entry with key '"//trim(key)//
"'")
1765 hashmap_get_logical=conv_to_logical(generic, .false.)
◆ list_get_logical()
logical function collections_mod::c_get_logical::list_get_logical |
( |
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
- Logical data in the list or raises an error if none is found
Definition at line 3099 of file collections.F90.
3100 type(list_type),
intent(inout) :: specificlist
3101 integer,
intent(in) :: i
3102 logical :: list_get_logical
3104 class(*),
pointer :: generic
3106 generic=>list_get_generic(specificlist, i)
3107 if (.not.
associated(generic))
call log_log(
log_error,
"Can not get logical from list at index "//trim(conv_to_string(i)))
3108 list_get_logical=conv_to_logical(generic, .false.)
◆ map_get_logical()
logical function collections_mod::c_get_logical::map_get_logical |
( |
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
- Logical value associated with the key or raises an error if none is found
Definition at line 1118 of file collections.F90.
1119 type(map_type),
intent(inout) :: specificmap
1120 character(len=*),
intent(in) :: key
1121 logical :: map_get_logical
1123 class(*),
pointer :: generic
1125 generic=>map_get_generic(specificmap, key)
1126 if (.not.
associated(generic))
call log_log(
log_error,
"Can not find logical entry with key '"//trim(key)//
"'")
1127 map_get_logical=conv_to_logical(generic, .false.)
◆ mapentry_get_logical()
logical function collections_mod::c_get_logical::mapentry_get_logical |
( |
type(mapentry_type), intent(in) |
mapentry_item | ) |
|
|
private |
Retrieves the logical value from a map entry.
- Parameters
-
mapentry_item | The map entry to retrieve the logical value from |
Definition at line 3366 of file collections.F90.
3367 type(mapentry_type),
intent(in) :: mapentry_item
3368 logical :: mapentry_get_logical
3370 class(*),
pointer :: generic
3372 generic=>mapentry_item%value
3373 if (.not.
associated(generic))
call log_log(
log_error,
"Can not get logical from map entry")
3374 mapentry_get_logical=conv_to_logical(generic, .false.)
◆ queue_get_logical()
logical function collections_mod::c_get_logical::queue_get_logical |
( |
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
- Logical element at i or raises an error if none is found
Definition at line 2705 of file collections.F90.
2706 type(queue_type),
intent(inout) :: specificqueue
2707 integer,
intent(in) :: i
2708 logical :: queue_get_logical
2710 class(*),
pointer :: generic
2712 generic=>queue_get_generic(specificqueue, i)
2713 if (.not.
associated(generic))
call log_log(
log_error,
"Can not get logical from queue at index "//trim(conv_to_string(i)))
2714 queue_get_logical=conv_to_logical(generic, .false.)
◆ stack_get_logical()
logical function collections_mod::c_get_logical::stack_get_logical |
( |
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
- Logical data or raises an error if none is found
Definition at line 2409 of file collections.F90.
2410 type(stack_type),
intent(inout) :: specificstack
2411 integer,
intent(in) :: i
2412 logical :: stack_get_logical
2414 class(*),
pointer :: generic
2416 generic=>stack_get_generic(specificstack, i)
2417 if (.not.
associated(generic))
call log_log(
log_error,
"Can not get logical from stack at index "//trim(conv_to_string(i)))
2418 stack_get_logical=conv_to_logical(generic, .false.)
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...