write_dataarray_tag Subroutine

private subroutine write_dataarray_tag(self, data_type, number_of_components, data_name, data_content, is_tuples)

Arguments

TypeIntentOptionalAttributesName
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
character, intent(in), optional :: data_content
logical, intent(in), optional :: is_tuples

Calls

proc~~write_dataarray_tag~~CallsGraph proc~write_dataarray_tag write_dataarray_tag interface~str str proc~write_dataarray_tag->interface~str proc~str_i8p str_I8P interface~str->proc~str_i8p proc~str_a_r8p str_a_R8P interface~str->proc~str_a_r8p proc~str_r8p str_R8P interface~str->proc~str_r8p proc~str_a_i4p str_a_I4P interface~str->proc~str_a_i4p proc~strf_i2p strf_I2P interface~str->proc~strf_i2p proc~str_r4p str_R4P interface~str->proc~str_r4p proc~str_i1p str_I1P interface~str->proc~str_i1p proc~strf_i4p strf_I4P interface~str->proc~strf_i4p proc~str_a_r4p str_a_R4P interface~str->proc~str_a_r4p proc~strf_r4p strf_R4P interface~str->proc~strf_r4p proc~str_i2p str_I2P interface~str->proc~str_i2p proc~str_a_i2p str_a_I2P interface~str->proc~str_a_i2p proc~strf_i8p strf_I8P interface~str->proc~strf_i8p proc~str_bol str_bol interface~str->proc~str_bol proc~strf_r8p strf_R8P interface~str->proc~strf_r8p proc~str_i4p str_I4P interface~str->proc~str_i4p proc~str_a_i8p str_a_I8P interface~str->proc~str_a_i8p proc~strf_i1p strf_I1P interface~str->proc~strf_i1p proc~str_a_i1p str_a_I1P interface~str->proc~str_a_i1p proc~str_a_r8p->proc~str_r8p proc~compact_real_string compact_real_string proc~str_r8p->proc~compact_real_string proc~str_a_i4p->proc~str_i4p proc~str_r4p->proc~compact_real_string proc~str_a_r4p->proc~str_r4p proc~str_a_i2p->proc~str_i2p proc~str_a_i8p->proc~str_i8p proc~str_a_i1p->proc~str_i1p

Contents

Source Code


Source Code

   subroutine write_dataarray_tag(self, data_type, number_of_components, data_name, data_content, is_tuples)
   !< Write `<DataArray...>...</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.
   character(*),               intent(in), optional :: data_content         !< Data content.
   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//'"'
   else
      tag_attributes = 'type="'//trim(adjustl(data_type))//                 &
        '" NumberOfComponents="'//trim(str(number_of_components, .true.))// &
        '" Name="'//trim(adjustl(data_name))//                              &
        '" format="'//self%format_ch//'"'
   endif
   call self%write_tag(name='DataArray', attributes=tag_attributes%chars(), content=data_content)
   endsubroutine write_dataarray_tag