Gets a specific integer element out of the list, stack, queue or map with the corresponding key.
More...
|
integer function | list_get_int (specificlist, i) |
| Retrieves the element at index i from the list. More...
|
|
integer function | stack_get_int (specificstack, i) |
| Gets a specific element from the stack at index specified. More...
|
|
integer function | queue_get_int (specificqueue, i) |
| Returns a specific queue element at an index. More...
|
|
integer function | map_get_int (specificmap, key) |
| Gets a specific element out of the map with the corresponding key. More...
|
|
integer function | hashmap_get_int (specificmap, key) |
| Gets a specific element out of the hashmap with the corresponding key. More...
|
|
integer function | mapentry_get_int (mapentry_item) |
| Retrieves the integer value from a map entry. More...
|
|
Gets a specific integer 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
- Integer value associated with the key or raises an error if none exists
Definition at line 378 of file collections.F90.
◆ hashmap_get_int()
integer function collections_mod::c_get_integer::hashmap_get_int |
( |
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
- Integer value associated with the key or raises an error if none is found
Definition at line 1696 of file collections.F90.
1696 type(hashmap_type),
intent(inout) :: specificmap
1697 character(len=*),
intent(in) :: key
1698 integer :: hashmap_get_int
1700 class(*),
pointer :: generic
1702 generic=>hashmap_get_generic(specificmap, key)
1703 if (.not.
associated(generic))
call log_log(log_error,
"Can not find integer entry with key '"//trim(key)//
"'")
1704 hashmap_get_int=conv_to_integer(generic, .false.)
◆ list_get_int()
integer function collections_mod::c_get_integer::list_get_int |
( |
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
- Integer data in the list or raises an error if none is found
Definition at line 3039 of file collections.F90.
3039 type(list_type),
intent(inout) :: specificlist
3040 integer,
intent(in) :: i
3041 integer :: list_get_int
3043 class(*),
pointer :: generic
3045 generic=>list_get_generic(specificlist, i)
3046 if (.not.
associated(generic))
call log_log(log_error,
"Can not get integer from list at index "//trim(conv_to_string(i)))
3047 list_get_int=conv_to_integer(generic, .false.)
◆ map_get_int()
integer function collections_mod::c_get_integer::map_get_int |
( |
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
- Integer value associated with the key or raises an error if none is found
Definition at line 1058 of file collections.F90.
1058 type(map_type),
intent(inout) :: specificmap
1059 character(len=*),
intent(in) :: key
1060 integer :: map_get_int
1062 class(*),
pointer :: generic
1064 generic=>map_get_generic(specificmap, key)
1065 if (.not.
associated(generic))
call log_log(log_error,
"Can not find integer entry with key '"//trim(key)//
"'")
1066 map_get_int=conv_to_integer(generic, .false.)
◆ mapentry_get_int()
integer function collections_mod::c_get_integer::mapentry_get_int |
( |
type(mapentry_type), intent(in) |
mapentry_item | ) |
|
|
private |
Retrieves the integer value from a map entry.
- Parameters
-
mapentry_item | The map entry to retrieve the integer value from |
Definition at line 3321 of file collections.F90.
3321 type(mapentry_type),
intent(in) :: mapentry_item
3322 integer :: mapentry_get_int
3324 class(*),
pointer :: generic
3326 generic=>mapentry_item%value
3327 if (.not.
associated(generic))
call log_log(log_error,
"Can not get integer from map entry")
3328 mapentry_get_int=conv_to_integer(generic, .false.)
◆ queue_get_int()
integer function collections_mod::c_get_integer::queue_get_int |
( |
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
- Integer element at i or raises an error if none is found
Definition at line 2645 of file collections.F90.
2645 type(queue_type),
intent(inout) :: specificqueue
2646 integer,
intent(in) :: i
2647 integer :: queue_get_int
2649 class(*),
pointer :: generic
2651 generic=>queue_get_generic(specificqueue, i)
2652 if (.not.
associated(generic))
call log_log(log_error,
"Can not get integer from queue at index "//trim(conv_to_string(i)))
2653 queue_get_int=conv_to_integer(generic, .false.)
◆ stack_get_int()
integer function collections_mod::c_get_integer::stack_get_int |
( |
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
- Integer data or raises an error if none is found
Definition at line 2349 of file collections.F90.
2349 type(stack_type),
intent(inout) :: specificstack
2350 integer,
intent(in) :: i
2351 integer :: stack_get_int
2353 class(*),
pointer :: generic
2355 generic=>stack_get_generic(specificstack, i)
2356 if (.not.
associated(generic))
call log_log(log_error,
"Can not get integer from stack at index "//trim(conv_to_string(i)))
2357 stack_get_int=conv_to_integer(generic, .false.)
The documentation for this interface was generated from the following file:
- /nfs/a277/earlcd/dev/monc/svn-git/monc/model_core/src/utils/collections.F90