Generic add interface for adding different types of data to the databases.
More...
|
recursive subroutine | options_add_integer (options_database, key, int_value, do_not_replace, array_index) |
| Adds an integer value to the options database with a specific key. More...
|
|
subroutine | options_add_real (options_database, key, real_value, do_not_replace, array_index) |
| Adds a real value to the options database with a specific key. More...
|
|
subroutine | options_add_logical (options_database, key, logical_value, do_not_replace, array_index) |
| Adds a logical value to the options database with a specific key. More...
|
|
subroutine | options_add_string (options_database, key, string_value, do_not_replace, array_index) |
| Adds a string value to the options database with a specific key. More...
|
|
Generic add interface for adding different types of data to the databases.
Definition at line 28 of file optionsdatabase.F90.
◆ options_add_integer()
recursive subroutine optionsdatabase_mod::options_add::options_add_integer |
( |
type(hashmap_type), intent(inout) |
options_database, |
|
|
character(len=*), intent(in) |
key, |
|
|
integer, intent(in) |
int_value, |
|
|
logical, intent(in), optional |
do_not_replace, |
|
|
integer, intent(in), optional |
array_index |
|
) |
| |
|
private |
Adds an integer value to the options database with a specific key.
- Parameters
-
options_database | The options database |
key | The key to use |
value | The integer value to add to the database |
do_not_replace | Optional flag whether to ignore existing values or replace them |
array_index | Optional array index which specifies which location in the array to write to |
Definition at line 552 of file optionsdatabase.F90.
553 type(hashmap_type),
intent(inout) :: options_database
554 character(len=*),
intent(in) :: key
555 integer,
intent(in) :: int_value
556 integer,
intent(in),
optional :: array_index
557 logical,
intent(in),
optional :: do_not_replace
560 character(len=len(key)+ARRAY_APPEND_SIZE) :: lookup_key
562 if (
present(do_not_replace))
then
563 if (do_not_replace)
then
564 if (
present(array_index))
then
565 if (options_has_key(options_database, trim(key)//
"a_"//conv_to_string(array_index)))
return
567 if (options_has_key(options_database, key))
return
572 if (
present(array_index))
then
573 if (options_has_key(options_database, trim(key)//
"a_size"))
then
575 if (temp_size .lt. array_index) temp_size=temp_size+1
579 call options_add(options_database, trim(key)//
"a_size", temp_size)
580 lookup_key=get_options_array_key(key, array_index)
584 call c_put_integer(options_database, lookup_key, int_value)
◆ options_add_logical()
subroutine optionsdatabase_mod::options_add::options_add_logical |
( |
type(hashmap_type), intent(inout) |
options_database, |
|
|
character(len=*), intent(in) |
key, |
|
|
logical, intent(in) |
logical_value, |
|
|
logical, intent(in), optional |
do_not_replace, |
|
|
integer, intent(in), optional |
array_index |
|
) |
| |
|
private |
Adds a logical value to the options database with a specific key.
- Parameters
-
options_database | The options database |
key | The key to use |
value | The logical value to add to the database |
do_not_replace | Optional flag whether to ignore existing values or replace them |
array_index | Optional array index which specifies which location in the array to write to |
Definition at line 468 of file optionsdatabase.F90.
469 type(hashmap_type),
intent(inout) :: options_database
470 character(len=*),
intent(in) :: key
471 logical,
intent(in) :: logical_value
472 integer,
intent(in),
optional :: array_index
473 logical,
intent(in),
optional :: do_not_replace
476 character(len=len(key)+ARRAY_APPEND_SIZE) :: lookup_key
478 if (
present(do_not_replace))
then
479 if (do_not_replace)
then
480 if (
present(array_index))
then
481 if (options_has_key(options_database, trim(key)//
"a_"//conv_to_string(array_index)))
return
483 if (options_has_key(options_database, key))
return
488 if (
present(array_index))
then
489 if (options_has_key(options_database, trim(key)//
"a_size"))
then
491 if (temp_size .lt. array_index) temp_size=temp_size+1
495 call options_add(options_database, trim(key)//
"a_size", temp_size)
496 lookup_key=get_options_array_key(key, array_index)
500 call c_put_logical(options_database, lookup_key, logical_value)
◆ options_add_real()
subroutine optionsdatabase_mod::options_add::options_add_real |
( |
type(hashmap_type), intent(inout) |
options_database, |
|
|
character(len=*), intent(in) |
key, |
|
|
real(kind=default_precision), intent(in) |
real_value, |
|
|
logical, intent(in), optional |
do_not_replace, |
|
|
integer, intent(in), optional |
array_index |
|
) |
| |
|
private |
Adds a real value to the options database with a specific key.
- Parameters
-
options_database | The options database |
key | The key to use |
value | The real value to add to the database |
do_not_replace | Optional flag whether to ignore existing values or replace them |
array_index | Optional array index which specifies which location in the array to write to |
Definition at line 427 of file optionsdatabase.F90.
428 type(hashmap_type),
intent(inout) :: options_database
429 character(len=*),
intent(in) :: key
431 integer,
intent(in),
optional :: array_index
432 logical,
intent(in),
optional :: do_not_replace
435 character(len=len(key)+ARRAY_APPEND_SIZE) :: lookup_key
437 if (
present(do_not_replace))
then
438 if (do_not_replace)
then
439 if (
present(array_index))
then
440 if (options_has_key(options_database, trim(key)//
"a_"//conv_to_string(array_index)))
return
442 if (options_has_key(options_database, key))
return
447 if (
present(array_index))
then
448 if (options_has_key(options_database, trim(key)//
"a_size"))
then
450 if (temp_size .lt. array_index) temp_size=temp_size+1
454 call options_add(options_database, trim(key)//
"a_size", temp_size)
455 lookup_key=get_options_array_key(key, array_index)
459 call c_put_real(options_database, lookup_key, real_value)
◆ options_add_string()
subroutine optionsdatabase_mod::options_add::options_add_string |
( |
type(hashmap_type), intent(inout) |
options_database, |
|
|
character(len=*), intent(in) |
key, |
|
|
character(len=*), intent(in) |
string_value, |
|
|
logical, intent(in), optional |
do_not_replace, |
|
|
integer, intent(in), optional |
array_index |
|
) |
| |
|
private |
Adds a string value to the options database with a specific key.
- Parameters
-
options_database | The options database |
key | The key to use |
value | The string value to add to the database |
do_not_replace | Optional flag whether to ignore existing values or replace them |
array_index | Optional array index which specifies which location in the array to write to |
Definition at line 509 of file optionsdatabase.F90.
510 type(hashmap_type),
intent(inout) :: options_database
511 character(len=*),
intent(in) :: key, string_value
512 integer,
intent(in),
optional :: array_index
513 logical,
intent(in),
optional :: do_not_replace
515 character(len=STRING_LENGTH) :: value_to_store
517 character(len=len(key)+ARRAY_APPEND_SIZE) :: lookup_key
519 if (
present(do_not_replace))
then
520 if (do_not_replace)
then
521 if (
present(array_index))
then
522 if (options_has_key(options_database, trim(key)//
"a_"//conv_to_string(array_index)))
return
524 if (options_has_key(options_database, key))
return
529 value_to_store=string_value
531 if (
present(array_index))
then
532 if (options_has_key(options_database, trim(key)//
"a_size"))
then
534 if (temp_size .lt. array_index) temp_size=temp_size+1
538 call options_add(options_database, trim(key)//
"a_size", temp_size)
539 lookup_key=get_options_array_key(key, array_index)
543 call c_put_string(options_database, lookup_key, value_to_store)
The documentation for this interface was generated from the following file: