CAMP 1.0.0
Chemistry Across Multiple Phases
camp_property::property_t Type Reference

Property data. More...

Collaboration diagram for camp_property::property_t:

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.
 
 finalize_array (this)
 Finalize a property_t array.
 

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.
 

Detailed Description

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 77 of file property.F90.

Constructor & Destructor Documentation

◆ finalize()

final camp_property::property_t::finalize ( type(property_t), intent(inout) this)
final

Finalize.

Parameters
[in,out]thisProperty dataset

Definition at line 69 of file property.F90.

Here is the call graph for this function:

Member Function/Subroutine Documentation

◆ finalize_array()

camp_property::property_t::finalize_array ( type(property_t), dimension(:), intent(inout) this)

Finalize a property_t array.

Parameters
[in,out]thisProperty dataset array

Definition at line 69 of file property.F90.

◆ get()

procedure, private camp_property::property_t::get ( class(property_t), intent(in) this,
character(len=*), intent(in) key )
private

Private functions Find a key-value pair by key name.

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

Definition at line 73 of file property.F90.

◆ get_int()

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.

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

Definition at line 47 of file property.F90.

◆ get_key()

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

Get the current key name.

Parameters
[in]thisProperty dataset
[out]keyKey name

Definition at line 45 of file property.F90.

◆ get_logical()

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.

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

Definition at line 51 of file property.F90.

◆ get_property_t()

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.

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

Definition at line 55 of file property.F90.

◆ get_real()

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.

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

Definition at line 49 of file property.F90.

◆ get_string()

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.

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

Definition at line 53 of file property.F90.

◆ iter_next()

procedure camp_property::property_t::iter_next ( class(property_t), intent(inout) this)

Increment the iterator.

Parameters
[in,out]thisProperty dataset

Definition at line 61 of file property.F90.

◆ iter_reset()

procedure camp_property::property_t::iter_reset ( class(property_t), intent(inout) this)

Reset the iterator.

Parameters
[in,out]thisProperty dataset

Definition at line 59 of file property.F90.

◆ load()

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.

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 41 of file property.F90.

◆ move()

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.

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

Definition at line 63 of file property.F90.

◆ print()

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.

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

Definition at line 67 of file property.F90.

◆ put()

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.

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 43 of file property.F90.

◆ size()

procedure camp_property::property_t::size ( class(property_t), intent(in) this)

Get the number of key-value pairs.

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

Definition at line 57 of file property.F90.

◆ update()

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.

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 65 of file property.F90.

Member Data Documentation

◆ curr_link

type(property_link_t), pointer camp_property::property_t::curr_link => null()

Iterator.

Definition at line 38 of file property.F90.

◆ first_link

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.

◆ last_link

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.

◆ num_elem

integer(kind=i_kind) camp_property::property_t::num_elem = 0
private

Number of elements.

Definition at line 32 of file property.F90.


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