CAMP 1.0.0
Chemistry Across Multiple Phases
Data Types | Functions/Subroutines
camp_property Module Reference

The property_t structure and associated subroutines. More...

Data Types

interface  property_link_t
 Property link data. More...
 
type  property_ptr
 
interface  property_t
 Property data. More...
 

Functions/Subroutines

type(property_t) function, pointer constructor ()
 Constructor for property_t.
 
recursive subroutine load (this, json, j_obj, as_object, owner_name, allow_duplicates)
 Load a property set from input data.
 
recursive subroutine put (this, key, val, allow_duplicates, owner_name)
 Put an element in the property data set.
 
logical function get_key (this, key)
 Get the key name of the element currently pointed to by the iterator. Returns true if the iterator points to a key-value pair; false indicates the list is empty, the iterator was never reset, or the end of the list has been reached. Array elements return true, but have an empty key name.
 
logical function get_int (this, key, val)
 Get an integer value. The return value is true if the key-value pair was found, and false otherwise. If no key name is specified, the current value of the iterator is returned. In this case true indicates a current key-value exists; false indicates the list is empty, the iterator was never reset, or the end of the list has been reached.
 
logical function get_real (this, key, val)
 Get a real value. The return value is true if the key-value pair was found, and false otherwise. If no key name is specified, the current value of the iterator is returned. In this case true indicates a current key-value exists; false indicates the list is empty, the iterator was never reset, or the end of the list has been reached.
 
logical function get_logical (this, key, val)
 Get a logical value. The return value is true if the key-value pair was found, and false otherwise. If no key name is specified, the current value of the iterator is returned. In this case true indicates a current key-value exists; false indicates the list is empty, the iterator was never reset, or the end of the list has been reached.
 
logical function get_string (this, key, val)
 Get a string value. The return value is true if the key-value pair was found, and false otherwise. If no key name is specified, the current value of the iterator is returned. In this case true indicates a current key-value exists; false indicates the list is empty, the iterator was never reset, or the end of the list has been reached.
 
logical function get_property_t (this, key, val)
 Get a property sub-set. The return value is true if the key-value pair was found, and false otherwise. If no key name is specified, the current value of the iterator is returned. In this case true indicates a current key-value exists; false indicates the list is empty, the iterator was never reset, or the end of the list has been reached.
 
integer(kind=i_kind) function get_size (this)
 Get the number of elements in the property set.
 
subroutine iter_reset (this)
 Initialize the iterator. It will now point to the first property in the dataset, or be NULL in the case of an empty property dataset.
 
subroutine iter_next (this)
 Increment the interator.
 
elemental subroutine move (this, dest)
 Move data from one property_t instance to another.
 
subroutine update (this, source, owner_name)
 Update this property_t instance with data from another instance.
 
recursive subroutine do_print (this, file_unit)
 Print the contents of a property set.
 
elemental subroutine finalize (this)
 Finalize a property_t variable.
 
type(property_link_t) function, pointer get (this, key)
 Find a key-value pair by key name. Returns a null pointer if the key name is not found.
 
type(property_link_t) function, pointer link_constructor (key, val)
 Constructor for property_link_t.
 
character(:) function, allocatable key (this)
 Get the key name of a property.
 
subroutine set_value (this, val)
 Set the value of a property key-value pair.
 
integer(kind=i_kind) function value_int (this)
 Get the int value of a property.
 
real(kind=dp) function value_real (this)
 Get the real value of a property.
 
logical function value_logical (this)
 Get the logical value of a property.
 
character(len=:) function, allocatable value_string (this)
 Get the string value of a property.
 
type(property_t) function, pointer value_property_t (this)
 Get the property_t value of a property.
 
recursive subroutine link_do_print (this, suffix, file_unit)
 Print the contents of a property key-value pair.
 
elemental subroutine link_finalize (this)
 Finalize the property_link_t variable.
 

Detailed Description

The property_t structure and associated subroutines.

Function/Subroutine Documentation

◆ constructor()

type(property_t) function, pointer camp_property::constructor
private

Constructor for property_t.

Returns
A new property set

Definition at line 132 of file property.F90.

◆ do_print()

recursive subroutine camp_property::do_print ( class(property_t), intent(in)  this,
integer(kind=i_kind), intent(in), optional  file_unit 
)
private

Print the contents of a property set.

Parameters
[in]thisProperty dataset
[in]file_unitFile unit for output

Definition at line 626 of file property.F90.

◆ finalize()

elemental subroutine camp_property::finalize ( type(property_t), intent(inout)  this)
private

Finalize a property_t variable.

Parameters
[in,out]thisProperty dataset

Definition at line 655 of file property.F90.

Here is the caller graph for this function:

◆ get()

type(property_link_t) function, pointer camp_property::get ( class(property_t), intent(in)  this,
character(len=*), intent(in)  key 
)
private

Find a key-value pair by key name. Returns a null pointer if the key name is not found.

Returns
Pointer to property key-value pair
Parameters
[in]thisProperty dataset
[in]keyKey name to search for

Definition at line 675 of file property.F90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_int()

logical function camp_property::get_int ( class(property_t), intent(in)  this,
character(len=*), intent(in), optional  key,
integer(kind=i_kind), intent(out)  val 
)
private

Get an integer value. The return value is true if the key-value pair was found, and false otherwise. If no key name is specified, the current value of the iterator is returned. In this case true indicates a current key-value exists; false indicates the list is empty, the iterator was never reset, or the end of the list has been reached.

Parameters
[in]thisProperty dataset
[in]keyKey name to search for
[out]valProperty value

Definition at line 381 of file property.F90.

Here is the call graph for this function:

◆ get_key()

logical function camp_property::get_key ( class(property_t), intent(in)  this,
character(len=:), intent(out), allocatable  key 
)
private

Get the key name of the element currently pointed to by the iterator. Returns true if the iterator points to a key-value pair; false indicates the list is empty, the iterator was never reset, or the end of the list has been reached. Array elements return true, but have an empty key name.

Parameters
[in]thisProperty dataset
[out]keyKey name

Definition at line 360 of file property.F90.

Here is the call graph for this function:

◆ get_logical()

logical function camp_property::get_logical ( class(property_t), intent(in)  this,
character(len=*), intent(in), optional  key,
logical, intent(out)  val 
)
private

Get a logical value. The return value is true if the key-value pair was found, and false otherwise. If no key name is specified, the current value of the iterator is returned. In this case true indicates a current key-value exists; false indicates the list is empty, the iterator was never reset, or the end of the list has been reached.

Parameters
[in]thisProperty dataset
[in]keyKey name to search for
[out]valProperty value

Definition at line 443 of file property.F90.

Here is the call graph for this function:

◆ get_property_t()

logical function camp_property::get_property_t ( class(property_t), intent(in)  this,
character(len=*), intent(in), optional  key,
type(property_t), intent(out), pointer  val 
)
private

Get a property sub-set. The return value is true if the key-value pair was found, and false otherwise. If no key name is specified, the current value of the iterator is returned. In this case true indicates a current key-value exists; false indicates the list is empty, the iterator was never reset, or the end of the list has been reached.

Parameters
[in]thisProperty dataset
[in]keyKey name to search for
[out]valProperty value

Definition at line 505 of file property.F90.

Here is the call graph for this function:

◆ get_real()

logical function camp_property::get_real ( class(property_t), intent(in)  this,
character(len=*), intent(in), optional  key,
real(kind=dp), intent(out)  val 
)
private

Get a real value. The return value is true if the key-value pair was found, and false otherwise. If no key name is specified, the current value of the iterator is returned. In this case true indicates a current key-value exists; false indicates the list is empty, the iterator was never reset, or the end of the list has been reached.

Parameters
[in]thisProperty dataset
[in]keyKey name to search for
[out]valProperty value

Definition at line 412 of file property.F90.

Here is the call graph for this function:

◆ get_size()

integer(kind=i_kind) function camp_property::get_size ( class(property_t), intent(in)  this)
private

Get the number of elements in the property set.

Returns
Number of elements in the property set
Parameters
[in]thisProperty dataset

Definition at line 533 of file property.F90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_string()

logical function camp_property::get_string ( class(property_t), intent(in)  this,
character(len=*), intent(in), optional  key,
character(len=:), intent(out), allocatable  val 
)
private

Get a string value. The return value is true if the key-value pair was found, and false otherwise. If no key name is specified, the current value of the iterator is returned. In this case true indicates a current key-value exists; false indicates the list is empty, the iterator was never reset, or the end of the list has been reached.

Parameters
[in]thisProperty dataset
[in]keyKey name to search for
[out]valProperty value

Definition at line 474 of file property.F90.

Here is the call graph for this function:

◆ iter_next()

subroutine camp_property::iter_next ( class(property_t), intent(inout)  this)
private

Increment the interator.

Parameters
[in,out]thisProperty dataset

Definition at line 567 of file property.F90.

Here is the call graph for this function:

◆ iter_reset()

subroutine camp_property::iter_reset ( class(property_t), intent(inout)  this)
private

Initialize the iterator. It will now point to the first property in the dataset, or be NULL in the case of an empty property dataset.

Parameters
[in,out]thisProperty dataset

Definition at line 555 of file property.F90.

◆ key()

character(:) function, allocatable camp_property::key ( class(property_link_t), intent(in)  this)
private

Get the key name of a property.

Returns
Key name
Parameters
[in]thisProperty key-value pair

Definition at line 725 of file property.F90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ link_constructor()

type(property_link_t) function, pointer camp_property::link_constructor ( character(len=*), intent(in)  key,
class(*), intent(in)  val 
)
private

Constructor for property_link_t.

Returns
Pointer to new property key-value pair
Parameters
[in]keyKey name
[in]valNew value

Definition at line 706 of file property.F90.

Here is the call graph for this function:

◆ link_do_print()

recursive subroutine camp_property::link_do_print ( class(property_link_t), intent(in)  this,
character(len=*), intent(in)  suffix,
integer(kind=i_kind), intent(in), optional  file_unit 
)
private

Print the contents of a property key-value pair.

Parameters
[in]thisProperty key-value pair
[in]suffixText to append to the end of the line
[in]file_unitFile unit for output

Definition at line 900 of file property.F90.

Here is the call graph for this function:

◆ link_finalize()

elemental subroutine camp_property::link_finalize ( type(property_link_t), intent(inout)  this)
private

Finalize the property_link_t variable.

Parameters
[in,out]thisProperty key-value pair

Definition at line 942 of file property.F90.

Here is the caller graph for this function:

◆ load()

recursive subroutine camp_property::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 
)
private

Load a property set from input data.

Parameters
[in,out]thisProperty dataset
[in]jsonJSON core
[in]j_objJSON object
[in]as_objectSet 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_nameName of the owner of the property set. For use in error messages
[in]allow_duplicatesFlag to indicate whether to allow duplicate keys. Defaults to false

Definition at line 145 of file property.F90.

Here is the call graph for this function:

◆ move()

elemental subroutine camp_property::move ( class(property_t), intent(inout)  this,
class(property_t), intent(inout)  dest 
)
private

Move data from one property_t instance to another.

Parameters
[in,out]thisProperty dataset to move
[in,out]destProperty dataset destination

Definition at line 583 of file property.F90.

◆ put()

recursive subroutine camp_property::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 
)
private

Put an element in the property data set.

Parameters
[in,out]thisProperty data set
[in]keyNew key
[in]valNew value
[in]allow_duplicatesFlag indicating whether to allow duplicate keys
[in]owner_nameName of owner of the property set. For use in error messages

Definition at line 265 of file property.F90.

Here is the call graph for this function:

◆ set_value()

subroutine camp_property::set_value ( class(property_link_t), intent(inout)  this,
class(*), intent(in)  val 
)
private

Set the value of a property key-value pair.

Parameters
[in,out]thisProperty key-value pair
[in]valNew value

Definition at line 739 of file property.F90.

Here is the call graph for this function:

◆ update()

subroutine camp_property::update ( class(property_t), intent(inout)  this,
class(property_t), intent(inout)  source,
character(len=*), intent(in)  owner_name 
)
private

Update this property_t instance with data from another instance.

Parameters
[in,out]thisProperty dataset to update
[in,out]sourceProperty dataset to update from
[in]owner_nameName of owner of the property set. For use in error messages

Definition at line 604 of file property.F90.

◆ value_int()

integer(kind=i_kind) function camp_property::value_int ( class(property_link_t), intent(in)  this)
private

Get the int value of a property.

Returns
Value
Parameters
[in]thisProperty key-value pair

Definition at line 783 of file property.F90.

Here is the call graph for this function:

◆ value_logical()

logical function camp_property::value_logical ( class(property_link_t), intent(in)  this)
private

Get the logical value of a property.

Returns
Value
Parameters
[in]thisProperty key-value pair

Definition at line 831 of file property.F90.

Here is the call graph for this function:

◆ value_property_t()

type(property_t) function, pointer camp_property::value_property_t ( class(property_link_t), intent(in)  this)
private

Get the property_t value of a property.

Returns
Value
Parameters
[in]thisProperty key-value pair

Definition at line 877 of file property.F90.

Here is the call graph for this function:

◆ value_real()

real(kind=dp) function camp_property::value_real ( class(property_link_t), intent(in)  this)
private

Get the real value of a property.

Returns
Value
Parameters
[in]thisProperty key-value pair

Definition at line 806 of file property.F90.

Here is the call graph for this function:

◆ value_string()

character(len=:) function, allocatable camp_property::value_string ( class(property_link_t), intent(in)  this)
private

Get the string value of a property.

Returns
Value
Parameters
[in]thisProperty key-value pair

Definition at line 854 of file property.F90.

Here is the call graph for this function: