A node of a parsed YAML document.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public | :: | node_kind | = | CABLE_YAML_UNDEFINED |
One of the |
|
| character(len=:), | public, | allocatable | :: | key |
The mapping key this node was found under. Unallocated for the root node and for sequence items. |
||
| character(len=:), | public, | allocatable | :: | text |
The scalar value as text. Only allocated for scalar nodes. |
||
| type(cable_yaml_node_t), | public, | allocatable | :: | children(:) |
Mapping values (in file order) or sequence items. |
Deep copy of a node and everything below it.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_yaml_node_t), | intent(inout) | :: | destination | |||
| type(cable_yaml_node_t), | intent(in) | :: | source |
Deep copy of a node and everything below it.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_yaml_node_t), | intent(inout) | :: | destination | |||
| type(cable_yaml_node_t), | intent(in) | :: | source |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_yaml_node_t), | intent(in) | :: | this |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_yaml_node_t), | intent(in) | :: | this |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_yaml_node_t), | intent(in) | :: | this |
Number of children of a mapping or sequence. Zero for scalars.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_yaml_node_t), | intent(in) | :: | this |
Whether this node is a mapping containing key.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_yaml_node_t), | intent(in) | :: | this | |||
| character(len=*), | intent(in) | :: | key |
The value stored under key. Aborts if this node has no such key.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_yaml_node_t), | intent(in) | :: | this | |||
| character(len=*), | intent(in) | :: | key |
The child_index-th child (1-based) of a mapping or sequence.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_yaml_node_t), | intent(in) | :: | this | |||
| integer, | intent(in) | :: | child_index |
The text of a scalar node. Aborts for mappings and sequences.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_yaml_node_t), | intent(in) | :: | this |
The scalar value as an integer. Aborts if it is not one.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_yaml_node_t), | intent(in) | :: | this |
The scalar value as a real. Aborts if it is not one.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_yaml_node_t), | intent(in) | :: | this |
The scalar value as a logical (true or false). Aborts otherwise.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_yaml_node_t), | intent(in) | :: | this |
Shorthand for this%get(key)%as_string().
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_yaml_node_t), | intent(in) | :: | this | |||
| character(len=*), | intent(in) | :: | key |
Shorthand for this%get(key)%as_integer().
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_yaml_node_t), | intent(in) | :: | this | |||
| character(len=*), | intent(in) | :: | key |
Shorthand for this%get(key)%as_real().
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_yaml_node_t), | intent(in) | :: | this | |||
| character(len=*), | intent(in) | :: | key |
Shorthand for this%get(key)%as_logical().
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cable_yaml_node_t), | intent(in) | :: | this | |||
| character(len=*), | intent(in) | :: | key |