MONC
Private Member Functions | List of all members
collections_mod::c_put_logical Interface Reference

Puts a logical key-value pair into the map. More...

Private Member Functions

subroutine map_put_logical (specificmap, key, logical_data)
 Puts a specific key-value pair into the map. More...
 
subroutine hashmap_put_logical (specificmap, key, logical_data)
 Puts a specific key-value pair into the hashmap. More...
 

Detailed Description

Puts a logical key-value pair into the map.

If the key is not already held in the map then the key-value pair will be added, otherwise the existing key-value pair will be modified to hold this updated value (keys must be unique) This has a time complexity of O(n) due to key look up

Parameters
collectionThe specific map involved
keyThe key to place in the map
valueLogical data value to place in the map

Definition at line 357 of file collections.F90.

Member Function/Subroutine Documentation

◆ hashmap_put_logical()

subroutine collections_mod::c_put_logical::hashmap_put_logical ( type(hashmap_type), intent(inout)  specificmap,
character(len=*), intent(in)  key,
logical, intent(in)  logical_data 
)
private

Puts a specific key-value pair into the hashmap.

If the key is not already held in the hashmap then the key-value pair will be added, otherwise the existing key-value pair will be modified to hold this updated value (keys must be unique). This uses a hashing function for performance Do not call directly from external module, this is called via the appropriate interface

Parameters
specificmapThe specific map involved
keyThe key to place in the map
dataLogical data value to place in the map

Definition at line 1344 of file collections.F90.

1344  type(hashmap_type), intent(inout) :: specificmap
1345  logical, intent(in) :: logical_data
1346  character(len=*), intent(in) :: key
1347 
1348  class(*), pointer :: generic
1349 
1350  generic=>conv_to_generic(logical_data, .true.)
1351  call hashmap_put_generic(specificmap, key, generic, .true.)

◆ map_put_logical()

subroutine collections_mod::c_put_logical::map_put_logical ( type(map_type), intent(inout)  specificmap,
character(len=*), intent(in)  key,
logical, intent(in)  logical_data 
)
private

Puts a specific key-value pair into the map.

If the key is not already held in the map then the key-value pair will be added, otherwise the existing key-value pair will be modified to hold this updated value (keys must be unique) Do not call directly from external module, this is called via the appropriate interface

Parameters
specificmapThe specific map involved
keyThe key to place in the map
dataLogical value to place in the map

Definition at line 705 of file collections.F90.

705  type(map_type), intent(inout) :: specificmap
706  logical, intent(in) :: logical_data
707  character(len=*), intent(in) :: key
708 
709  class(*), pointer :: generic
710 
711  generic=>conv_to_generic(logical_data, .true.)
712  call map_put_generic(specificmap, key, generic, .true.)

The documentation for this interface was generated from the following file: