|
TUV-x
|
The config_t type and related functions. More...
Data Types | |
| type | config_iterator_t |
| Configuration data iterator. More... | |
| type | config_t |
| Model configuration data. More... | |
Functions/Subroutines | |
| subroutine | empty (this) |
| Empties the configuration. | |
| subroutine | construct_from_file (this, file_name) |
| Constructs a configuration from a file. | |
| subroutine | to_file (this, file_name) |
| Writes a configuration to a file. | |
| integer(kind=musica_ik) function | number_of_children (this) |
| Returns the number of child objects. | |
| class(iterator_t) function, pointer | get_iterator (this) |
| Gets an interator for the configuration data. | |
| type(string_t) function | key (this, iterator) |
| Gets the key name using an iterator. | |
| subroutine | get_config (this, key, value, caller, default, found) |
| Gets a subset of the configuration data. | |
| subroutine | get_string_string_default (this, key, value, caller, default, found) |
| Gets a string from the configuration data. | |
| subroutine | get_string (this, key, value, caller, default, found) |
| Gets a string from the configuration data. | |
| subroutine | get_int (this, key, value, caller, default, found) |
| Gets an integer from the configuration data. | |
| subroutine | get_float (this, key, value, caller, default, found) |
| Gets a single-precision real number from the configuration data. | |
| subroutine | get_double (this, key, value, caller, default, found) |
| Gets a double-precision real number from the configuration data. | |
| subroutine | get_logical (this, key, value, caller, default, found) |
| Gets a boolean value from the configuration data. | |
| subroutine | get_string_array (this, key, value, caller, default, found) |
| Gets an array of strings from the configuration data. | |
| subroutine | get_double_array (this, key, value, caller, default, found) |
| Gets an array of doubles from the configuration data. | |
| recursive subroutine | get_config_array (this, key, value, caller, default, found) |
| Gets an array of config_t objects. | |
| subroutine | get_from_iterator (this, iterator, value, caller) |
| Gets a value using an iterator. | |
| subroutine | get_array_from_iterator (this, iterator, value, caller) |
| Gets an array value using an iterator. | |
| recursive subroutine | add_config (this, key, value, caller) |
| Adds a subset of configuration data. | |
| subroutine | add_char_array (this, key, value, caller) |
| Adds a string to the configuration data. | |
| subroutine | add_string (this, key, value, caller) |
| Adds a string to the configuration data. | |
| subroutine | add_int (this, key, value, caller) |
| Adds an integer to the configuration data. | |
| subroutine | add_float (this, key, value, caller) |
| Adds a single-precision real number to the configuration data. | |
| subroutine | add_double (this, key, value, caller) |
| Adds a double-precision real number to the configuration data. | |
| subroutine | add_logical (this, key, value, caller) |
| Adds a boolean to the configuration data. | |
| subroutine | add_string_array (this, key, value, caller) |
| Adds a string array to the configuration data. | |
| subroutine | add_double_array (this, key, value, caller) |
| Adds a double array to the configuration data. | |
| recursive subroutine | add_config_array (this, key, value, caller) |
| Adds a config_t array to the configuration data. | |
| subroutine | config_assign_config (a, b) |
| Assigns a config_t from a config_t. | |
| subroutine | config_assign_string (config, string) |
| Assigns a config_t from a string. | |
| subroutine | config_assign_char (config, string) |
| Assigns a config_t from a character array. | |
| subroutine | string_assign_config (string, config) |
| Assigns a string from a configuration. | |
| subroutine | finalize (this) |
| Cleans up memory. | |
| subroutine | finalize_1d_array (this) |
| Cleans up memory. | |
| subroutine | find_by_prefix (this, prefix, full_key, found) |
| Finds a full key name by a prefix. | |
| recursive subroutine | merge_in (this, other, caller) |
| Merges another config_t object into the config_t object. | |
| logical function | find_key_in_list (key_to_find, list) |
| Returns true if the given key is in the given list of keys. | |
| logical function | validate (this, required_keys, optional_keys) |
| Validates the format of the configuration data. | |
| subroutine | do_print (this) |
| Print out the raw contents of the configuration. | |
| integer function | pack_size (this, comm) |
| Returns the size of a binary buffer required to pack the object. | |
| subroutine | mpi_pack (this, buffer, position, comm) |
| Packs the configuration onto a character buffer. | |
| subroutine | mpi_unpack (this, buffer, position, comm) |
| Unpacks the configuration from a character buffer. | |
| logical function | iterator_next (this) |
| Advances the iterator. | |
| subroutine | iterator_reset (this, parent) |
| Resets the iterator. | |
| subroutine | iterator_finalize (this) |
| Cleans up memory assoicated with an iterator. | |
| subroutine | initialize_config_t (config, string) |
| Initialize a config_t object. | |
| character(len=1, kind=c_char) function, dimension(:), allocatable | to_c_string (f_string) |
| Convert a fortran character array to a c string. | |
| character(len=:) function, allocatable | to_f_string (c_string) |
| Convert a c string to a fortran character array. | |
The config_t type and related functions.
|
private |
Adds a string to the configuration data.
| [in,out] | this | Configuration |
| [in] | key | Key in insert |
| [in] | value | Value to set |
| [in] | caller | Name of the calling function (only for use in error messages) |
|
private |
Adds a subset of configuration data.
| [in,out] | this | Configuration |
| [in] | key | Key in insert |
| [in] | value | Value to set |
| [in] | caller | Name of the calling function (only for use in error messages) |
|
private |
Adds a config_t array to the configuration data.
| [in,out] | this | Configuration |
| [in] | key | Key in insert |
| [in] | value | Value to set |
| [in] | caller | Name of the calling function (only for use in error messages) |
|
private |
Adds a double-precision real number to the configuration data.
| [in,out] | this | Configuration |
| [in] | key | Key in insert |
| [in] | value | Value to set |
| [in] | caller | Name of the calling function (only for use in error messages) |
|
private |
Adds a double array to the configuration data.
| [in,out] | this | Configuration |
| [in] | key | Key to insert |
| [in] | value | Value to set |
| [in] | caller | Name of the calling function (only for use in error messages) |
|
private |
Adds a single-precision real number to the configuration data.
| [in,out] | this | Configuration |
| [in] | key | Key in insert |
| [in] | value | Value to set |
| [in] | caller | Name of the calling function (only for use in error messages) |
|
private |
Adds an integer to the configuration data.
| [in,out] | this | Configuration |
| [in] | key | Key in insert |
| [in] | value | Value to set |
| [in] | caller | Name of the calling function (only for use in error messages) |
|
private |
Adds a boolean to the configuration data.
| [in,out] | this | Configuration |
| [in] | key | Key in insert |
| [in] | value | Value to set |
| [in] | caller | Name of the calling function (only for use in error messages) |
|
private |
Adds a string to the configuration data.
| [in,out] | this | Configuration |
| [in] | key | Key in insert |
| [in] | value | Value to set |
| [in] | caller | Name of the calling function (only for use in error messages) |
|
private |
Adds a string array to the configuration data.
| [in,out] | this | Configuration |
| [in] | key | Key in insert |
| [in] | value | Value to set |
| [in] | caller | Name of the calling function (only for use in error messages) |
|
private |
Assigns a config_t from a character array.
| [out] | config | Configuration to assign to |
| [in] | string | String to assign from |
|
private |
Assigns a config_t from a string.
| [out] | config | Configuration to assign to |
| [in] | string | String to assign from |
|
private |
Constructs a configuration from a file.
| [out] | this | New configuration |
| [in] | file_name | File name containing configuration data |
|
private |
Print out the raw contents of the configuration.
| [in,out] | this | Configuration |
| subroutine musica_config::empty | ( | class(config_t), intent(out) | this | ) |
Empties the configuration.
| [out] | this | Configuration |
|
private |
Cleans up memory.
| [in,out] | this | Configuration |
|
private |
Cleans up memory.
| [in,out] | this | Configuration |
|
private |
Finds a full key name by a prefix.
Returns the first instance of the prefix if found
| [in,out] | this | Configuration |
| [in] | prefix | Prefix to search for (first instance is returned) |
| [out] | full_key | Full key found |
| [out] | found | Flag indicating whether the key was found |
|
private |
Gets an array value using an iterator.
| [in,out] | this | Configuration |
| [in] | iterator | Iterator to use to find value |
| [out] | value | Returned value |
| [in] | caller | Name of the calling function (only for use in error messages) |
|
private |
Gets a subset of the configuration data.
| [in,out] | this | Configuration |
| [in] | key | Key used to find value |
| [out] | value | Returned value |
| [in] | caller | Name of the calling function (only for use in error messages) |
| [in] | default | Default value if not found |
| [out] | found | Flag indicating whether key was found |
|
private |
Gets an array of config_t objects.
| [in,out] | this | Configuration |
| [in] | key | Key used to find value |
| [out] | value | Returned value |
| [in] | caller | Name of the calling function (only for use in error messages) |
| [in] | default | Default value if not found |
| [out] | found | Flag indicating whether key was found |
|
private |
Gets a double-precision real number from the configuration data.
| [in,out] | this | Configuration |
| [in] | key | Key used to find value |
| [out] | value | Returned value |
| [in] | caller | Name of the calling function (only for use in error messages) |
| [in] | default | Default value if not found |
| [out] | found | Flag indicating whether key was found |
|
private |
Gets an array of doubles from the configuration data.
| [in,out] | this | Configuration |
| [in] | key | Key used to find value |
| [out] | value | Returned value |
| [in] | caller | Name of the calling function (only for use in error messages) |
| [in] | default | Default value if not found |
| [out] | found | Flag indicating whether key was found |
|
private |
Gets a single-precision real number from the configuration data.
| [in,out] | this | Configuration |
| [in] | key | Key used to find value |
| [out] | value | Returned value |
| [in] | caller | Name of the calling function (only for use in error messages) |
| [in] | default | Default value if not found |
| [out] | found | Flag indicating whether key was found |
|
private |
Gets a value using an iterator.
| [in,out] | this | Configuration |
| [in] | iterator | Iterator to use to find value |
| [out] | value | Returned value |
| [in] | caller | Name of the calling function (only for use in error messages) |
|
private |
Gets an integer from the configuration data.
| [in,out] | this | Configuration |
| [in] | key | Key used to find value |
| [out] | value | Returned value |
| [in] | caller | Name of the calling function (only for use in error messages) |
| [in] | default | Default value if not found |
| [out] | found | Flag indicating whether key was found |
|
private |
Gets an interator for the configuration data.
| [in] | this | Configuration |
|
private |
Gets a boolean value from the configuration data.
| [in,out] | this | Configuration |
| [in] | key | Key used to find value |
| [out] | value | Returned value |
| [in] | caller | Name of the calling function (only for use in error messages) |
| [in] | default | Default value if not found |
| [out] | found | Flag indicating whether key was found |
|
private |
Gets a string from the configuration data.
| [in,out] | this | Configuration |
| [in] | key | Key used to find value |
| [out] | value | Returned value |
| [in] | caller | Name of the calling function (only for use in error messages) |
| [in] | default | Default value if not found |
| [out] | found | Flag indicating whether key was found |
|
private |
Gets an array of strings from the configuration data.
| [in,out] | this | Configuration |
| [in] | key | Key used to find value |
| [out] | value | Returned value |
| [in] | caller | Name of the calling function (only for use in error messages) |
| [in] | default | Default value if not found |
| [out] | found | Flag indicating whether key was found |
|
private |
Gets a string from the configuration data.
| [in,out] | this | Configuration |
| [in] | key | Key used to find value |
| [out] | value | Returned value |
| [in] | caller | Name of the calling function (only for use in error messages) |
| [in] | default | Default value if not found |
| [out] | found | Flag indicating whether key was found |
|
private |
Initialize a config_t object.
| [in,out] | config | Configuration |
| [in] | string | YAML string |
|
private |
Cleans up memory assoicated with an iterator.
| [in,out] | this | Iterator |
|
private |
Advances the iterator.
Returns false if the end of the collection has been reached
| [in,out] | this | Iterator |
|
private |
Resets the iterator.
| [in,out] | this | Iterator |
| [in] | parent | Iterator for parent model element |
|
private |
Gets the key name using an iterator.
| [in,out] | this | Configuration |
| [in] | iterator | Configuration iterator |
|
private |
Packs the configuration onto a character buffer.
| [in,out] | this | Configuration to pack |
| [in,out] | buffer | Memory buffer |
| [in,out] | position | Current buffer position |
| [in] | comm | MPI communicator |
|
private |
Unpacks the configuration from a character buffer.
| [out] | this | Configuration to unpack |
| [in,out] | buffer | Memory buffer |
| [in,out] | position | Current buffer position |
| [in] | comm | MPI communicator |
|
private |
Returns the number of child objects.
| [in,out] | this | Configuration |
|
private |
Assigns a string from a configuration.
| [out] | string | String to assign to |
| [in] | config | Configuration to assign from |
|
private |
Convert a fortran character array to a c string.
| [in] | f_string | Fortran string to convert |
|
private |
Convert a c string to a fortran character array.
| [in] | c_string | C pointer to const char* |
|
private |
Writes a configuration to a file.
| [in,out] | this | Configuration |
| [in] | file_name | File name to save configuration with |
|
private |
Validates the format of the configuration data.
Ensures that the required keys are present, and that user-defined keys start with a "`__`" prefix.
| [in,out] | this | Configuration |
| [in] | required_keys | Required keys |
| [in] | optional_keys | Optional keys |