Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(xml_writer_abstract), | intent(inout) | :: | self | |||
character, | intent(in) | :: | data_type | |||
integer(kind=I4P), | intent(in) | :: | number_of_components | |||
character, | intent(in) | :: | data_name | |||
logical, | intent(in), | optional | :: | is_tuples |
subroutine write_dataarray_tag_appended(self, data_type, number_of_components, data_name, is_tuples)
!< Write `<DataArray.../>` tag.
class(xml_writer_abstract), intent(inout) :: self !< Writer.
character(*), intent(in) :: data_type !< Type of dataarray.
integer(I4P), intent(in) :: number_of_components !< Number of dataarray components.
character(*), intent(in) :: data_name !< Data name.
logical, intent(in), optional :: is_tuples !< Use "NumberOfTuples".
type(string) :: tag_attributes !< Tag attributes.
logical :: is_tuples_ !< Use "NumberOfTuples".
is_tuples_ = .false.
if (present(is_tuples)) is_tuples_ = is_tuples
if (is_tuples_) then
tag_attributes = 'type="'//trim(adjustl(data_type))// &
'" NumberOfTuples="'//trim(str(number_of_components, .true.))// &
'" Name="'//trim(adjustl(data_name))// &
'" format="'//self%format_ch// &
'" offset="'//trim(str(self%ioffset, .true.))//'"'
else
tag_attributes = 'type="'//trim(adjustl(data_type))// &
'" NumberOfComponents="'//trim(str(number_of_components, .true.))// &
'" Name="'//trim(adjustl(data_name))// &
'" format="'//self%format_ch// &
'" offset="'//trim(str(self%ioffset, .true.))//'"'
endif
call self%write_self_closing_tag(name='DataArray', attributes=tag_attributes%chars())
endsubroutine write_dataarray_tag_appended