Gets a specific generic element out of the list, stack, queue or map with the corresponding key.
More...
|
class(*) function, pointer | list_get_generic (specificlist, i) |
| Retrieves the element at index i from the list or null if index < list size. More...
|
|
class(*) function, pointer | stack_get_generic (specificstack, i) |
| Gets a specific element from the stack at index specified or null if the index > stack size. More...
|
|
class(*) function, pointer | queue_get_generic (specificqueue, i) |
| Returns a specific queue element at an index or null if index > queue size. More...
|
|
class(*) function, pointer | map_get_generic (specificmap, key) |
| Gets a specific element out of the map with the corresponding key. More...
|
|
class(*) function, pointer | hashmap_get_generic (specificmap, key) |
| Gets a specific element out of the hashmap with the corresponding key. More...
|
|
class(*) function, pointer | mapentry_get_generic (mapentry_item) |
| Retrieves the generic value from a map entry. More...
|
|
Gets a specific generic 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
- Generic pointer to the value associated with the key or null if none exists
Definition at line 367 of file collections.F90.
◆ hashmap_get_generic()
class(*) function, pointer collections_mod::c_get_generic::hashmap_get_generic |
( |
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
- Pointer to the generic value associated with the key or null if none exists
Definition at line 1774 of file collections.F90.
1775 type(hashmap_type),
intent(inout) :: specificmap
1776 character(len=*),
intent(in) :: key
1777 class(*),
pointer :: hashmap_get_generic, raw_map_node
1779 raw_map_node=>hashmap_getnode(specificmap, key)
1780 if (
associated(raw_map_node))
then
1781 select type (raw_map_node)
1782 type is (mapnode_type)
1783 hashmap_get_generic=>raw_map_node%value
1787 hashmap_get_generic=>null()
◆ list_get_generic()
class(*) function, pointer collections_mod::c_get_generic::list_get_generic |
( |
type(list_type), intent(inout) |
specificlist, |
|
|
integer, intent(in) |
i |
|
) |
| |
|
private |
Retrieves the element at index i from the list or null if index < list size.
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
- Pointer to the generic data in the list
Definition at line 3117 of file collections.F90.
3118 type(list_type),
intent(inout) :: specificlist
3119 integer,
intent(in) :: i
3120 class(*),
pointer :: list_get_generic
3123 type(listnode_type),
pointer :: node
3126 if (specificlist%size .lt. i)
then
3127 list_get_generic => null()
3130 node => specificlist%head
3132 if (.not.
associated(node))
exit
3136 list_get_generic => node%data
◆ map_get_generic()
class(*) function, pointer collections_mod::c_get_generic::map_get_generic |
( |
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
- Pointer to the generic value associated with the key or null if none exists
Definition at line 1136 of file collections.F90.
1137 type(map_type),
intent(inout) :: specificmap
1138 character(len=*),
intent(in) :: key
1139 class(*),
pointer :: map_get_generic, raw_map_node
1141 raw_map_node=>map_getnode(specificmap, key)
1142 if (
associated(raw_map_node))
then
1143 select type (raw_map_node)
1144 type is (mapnode_type)
1145 map_get_generic => raw_map_node%value
1149 map_get_generic => null()
◆ mapentry_get_generic()
class(*) function, pointer collections_mod::c_get_generic::mapentry_get_generic |
( |
type(mapentry_type), intent(in) |
mapentry_item | ) |
|
|
private |
Retrieves the generic value from a map entry.
- Parameters
-
mapentry_item | The map entry to retrieve the generic value from |
Definition at line 3379 of file collections.F90.
3380 type(mapentry_type),
intent(in) :: mapentry_item
3381 class(*),
pointer :: mapentry_get_generic
3383 mapentry_get_generic=>mapentry_item%value
◆ queue_get_generic()
class(*) function, pointer collections_mod::c_get_generic::queue_get_generic |
( |
type(queue_type), intent(inout) |
specificqueue, |
|
|
integer, intent(in) |
i |
|
) |
| |
|
private |
Returns a specific queue element at an index or null if index > queue size.
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
- Pointer to the generic queue element at i or null if the index does not exist
Definition at line 2723 of file collections.F90.
2724 type(queue_type),
intent(inout) :: specificqueue
2725 integer,
intent(in) :: i
2726 class(*),
pointer :: queue_get_generic
2728 queue_get_generic=>list_get_generic(specificqueue%queue_ds, i)
◆ stack_get_generic()
class(*) function, pointer collections_mod::c_get_generic::stack_get_generic |
( |
type(stack_type), intent(inout) |
specificstack, |
|
|
integer, intent(in) |
i |
|
) |
| |
|
private |
Gets a specific element from the stack at index specified or null if the index > stack size.
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
- Pointer to the generic data
Definition at line 2427 of file collections.F90.
2428 type(stack_type),
intent(inout) :: specificstack
2429 integer,
intent(in) :: i
2430 class(*),
pointer :: stack_get_generic
2432 stack_get_generic=>list_get_generic(specificstack%stack_ds, i)
The documentation for this interface was generated from the following file: