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

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

Private Member Functions

subroutine map_put_string (specificmap, key, str_data)
 Puts a specific key-value pair into the map. More...
 
subroutine hashmap_put_string (specificmap, key, str_data)
 Puts a specific key-value pair into the hashmap. More...
 

Detailed Description

Puts a string 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
valueString data value to place in the map

Definition at line 331 of file collections.F90.

Member Function/Subroutine Documentation

◆ hashmap_put_string()

subroutine collections_mod::c_put_string::hashmap_put_string ( type(hashmap_type), intent(inout)  specificmap,
character(len=*), intent(in)  key,
character(len=string_length), intent(in)  str_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
dataString data value to place in the map

Definition at line 1303 of file collections.F90.

1304  type(hashmap_type), intent(inout) :: specificmap
1305  character(len=STRING_LENGTH), intent(in) :: str_data
1306  character(len=*), intent(in) :: key
1307 
1308  class(*), pointer :: generic
1309 
1310  generic=>conv_to_generic(str_data, .true.)
1311  call hashmap_put_generic(specificmap, key, generic, .true.)

◆ map_put_string()

subroutine collections_mod::c_put_string::map_put_string ( type(map_type), intent(inout)  specificmap,
character(len=*), intent(in)  key,
character(len=string_length), intent(in)  str_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
dataString value to place in the map

Definition at line 664 of file collections.F90.

665  type(map_type), intent(inout) :: specificmap
666  character(len=STRING_LENGTH), intent(in) :: str_data
667  character(len=*), intent(in) :: key
668 
669  class(*), pointer :: generic
670 
671  generic=>conv_to_generic(str_data, .true.)
672  call map_put_generic(specificmap, key, generic, .true.)

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