CAMP 1.0.0
Chemistry Across Multiple Phases
|
Property data. More...
Public Member Functions | |
procedure | load (this, json, j_obj, as_object, owner_name, allow_duplicates) |
Load input data. | |
procedure | put (this, key, val, allow_duplicates, owner_name) |
Put a value in the data set. | |
procedure | get_key (this, key) |
Get the current key name. | |
procedure | get_int (this, key, val) |
Get an integer value. | |
procedure | get_real (this, key, val) |
Get a real value. | |
procedure | get_logical (this, key, val) |
Get a logical value. | |
procedure | get_string (this, key, val) |
Get a string value. | |
procedure | get_property_t (this, key, val) |
Get a sub-set of properties. | |
procedure | size (this) |
Get the number of key-value pairs. | |
procedure | iter_reset (this) |
Reset the iterator. | |
procedure | iter_next (this) |
Increment the iterator. | |
procedure | move (this, dest) |
Move property data from one property_t instance to another. | |
procedure | update (this, source, owner_name) |
Update this property_t instance with data from another. | |
procedure | print (this, file_unit) |
Print the contents of a property set. | |
final | finalize (this) |
Finalize. | |
Public Attributes | |
type(property_link_t), pointer | first_link => null() |
First element in the set. | |
type(property_link_t), pointer | last_link => null() |
Last element in the set. | |
type(property_link_t), pointer | curr_link => null() |
Iterator. | |
Private Member Functions | |
procedure, private | get (this, key) |
Private functions Find a key-value pair by key name. | |
Private Attributes | |
integer(kind=i_kind) | num_elem = 0 |
Number of elements. | |
Property data.
A set of physical properties, sub-model parameters and similar constants related to a chemical species, reaction, or other data object. The property_t
type can be used to build a set of data with a json
-like structure.
Definition at line 29 of file property.F90.
|
final |
Finalize.
[in,out] | this | Property dataset |
Definition at line 69 of file property.F90.
|
private |
Private functions Find a key-value pair by key name.
[in] | this | Property dataset |
[in] | key | Key name to search for |
Definition at line 73 of file property.F90.
procedure camp_property::property_t::get_int | ( | class(property_t), intent(in) | this, |
character(len=*), intent(in), optional | key, | ||
integer(kind=i_kind), intent(out) | val | ||
) |
Get an integer value.
[in] | this | Property dataset |
[in] | key | Key name to search for |
[out] | val | Property value |
Definition at line 47 of file property.F90.
procedure camp_property::property_t::get_key | ( | class(property_t), intent(in) | this, |
character(len=:), intent(out), allocatable | key | ||
) |
Get the current key name.
[in] | this | Property dataset |
[out] | key | Key name |
Definition at line 45 of file property.F90.
procedure camp_property::property_t::get_logical | ( | class(property_t), intent(in) | this, |
character(len=*), intent(in), optional | key, | ||
logical, intent(out) | val | ||
) |
Get a logical value.
[in] | this | Property dataset |
[in] | key | Key name to search for |
[out] | val | Property value |
Definition at line 51 of file property.F90.
procedure camp_property::property_t::get_property_t | ( | class(property_t), intent(in) | this, |
character(len=*), intent(in), optional | key, | ||
type(property_t), intent(out), pointer | val | ||
) |
Get a sub-set of properties.
[in] | this | Property dataset |
[in] | key | Key name to search for |
[out] | val | Property value |
Definition at line 55 of file property.F90.
procedure camp_property::property_t::get_real | ( | class(property_t), intent(in) | this, |
character(len=*), intent(in), optional | key, | ||
real(kind=dp), intent(out) | val | ||
) |
Get a real value.
[in] | this | Property dataset |
[in] | key | Key name to search for |
[out] | val | Property value |
Definition at line 49 of file property.F90.
procedure camp_property::property_t::get_string | ( | class(property_t), intent(in) | this, |
character(len=*), intent(in), optional | key, | ||
character(len=:), intent(out), allocatable | val | ||
) |
Get a string value.
[in] | this | Property dataset |
[in] | key | Key name to search for |
[out] | val | Property value |
Definition at line 53 of file property.F90.
procedure camp_property::property_t::iter_next | ( | class(property_t), intent(inout) | this | ) |
Increment the iterator.
[in,out] | this | Property dataset |
Definition at line 61 of file property.F90.
procedure camp_property::property_t::iter_reset | ( | class(property_t), intent(inout) | this | ) |
Reset the iterator.
[in,out] | this | Property dataset |
Definition at line 59 of file property.F90.
procedure camp_property::property_t::load | ( | class(property_t), intent(inout) | this, |
type(json_core), intent(in), pointer | json, | ||
type(json_value), intent(in), pointer | j_obj, | ||
logical, intent(in) | as_object, | ||
character(len=*), intent(in) | owner_name, | ||
logical, intent(in), optional | allow_duplicates | ||
) |
Load input data.
[in,out] | this | Property dataset |
[in] | json | JSON core |
[in] | j_obj | JSON object |
[in] | as_object | Set to true if j_obj is a json object to parse, adding all child key-value pairs to the data set, or false if j_obj is a single key-value pair to add to the data set |
[in] | owner_name | Name of the owner of the property set. For use in error messages |
[in] | allow_duplicates | Flag to indicate whether to allow duplicate keys. Defaults to false |
Definition at line 41 of file property.F90.
procedure camp_property::property_t::move | ( | class(property_t), intent(inout) | this, |
class(property_t), intent(inout) | dest | ||
) |
Move property data from one property_t instance to another.
[in,out] | this | Property dataset to move |
[in,out] | dest | Property dataset destination |
Definition at line 63 of file property.F90.
procedure camp_property::property_t::print | ( | class(property_t), intent(in) | this, |
integer(kind=i_kind), intent(in), optional | file_unit | ||
) |
Print the contents of a property set.
[in] | this | Property dataset |
[in] | file_unit | File unit for output |
Definition at line 67 of file property.F90.
procedure camp_property::property_t::put | ( | class(property_t), intent(inout) | this, |
character(len=*), intent(in) | key, | ||
class(*), intent(in) | val, | ||
logical, intent(in) | allow_duplicates, | ||
character(len=*), intent(in) | owner_name | ||
) |
Put a value in the data set.
[in,out] | this | Property data set |
[in] | key | New key |
[in] | val | New value |
[in] | allow_duplicates | Flag indicating whether to allow duplicate keys |
[in] | owner_name | Name of owner of the property set. For use in error messages |
Definition at line 43 of file property.F90.
procedure camp_property::property_t::size | ( | class(property_t), intent(in) | this | ) |
Get the number of key-value pairs.
[in] | this | Property dataset |
Definition at line 57 of file property.F90.
procedure camp_property::property_t::update | ( | class(property_t), intent(inout) | this, |
class(property_t), intent(inout) | source, | ||
character(len=*), intent(in) | owner_name | ||
) |
Update this property_t instance with data from another.
[in,out] | this | Property dataset to update |
[in,out] | source | Property dataset to update from |
[in] | owner_name | Name of owner of the property set. For use in error messages |
Definition at line 65 of file property.F90.
type(property_link_t), pointer camp_property::property_t::curr_link => null() |
Iterator.
Definition at line 38 of file property.F90.
type(property_link_t), pointer camp_property::property_t::first_link => null() |
First element in the set.
Definition at line 34 of file property.F90.
type(property_link_t), pointer camp_property::property_t::last_link => null() |
Last element in the set.
Definition at line 36 of file property.F90.
|
private |
Number of elements.
Definition at line 32 of file property.F90.