alloc_attributes Subroutine

private elemental subroutine alloc_attributes(self, Na)

Type Bound

xml_tag

Arguments

Type IntentOptional Attributes Name
class(xml_tag), intent(inout) :: self
integer(kind=I4P), intent(in) :: Na

Called by

proc~~alloc_attributes~~CalledByGraph proc~alloc_attributes xml_tag%alloc_attributes proc~add_single_attribute xml_tag%add_single_attribute proc~add_single_attribute->proc~alloc_attributes proc~parse_attributes_names xml_tag%parse_attributes_names proc~parse_attributes_names->proc~alloc_attributes none~add_attributes xml_tag%add_attributes none~add_attributes->proc~add_single_attribute proc~add_multiple_attributes xml_tag%add_multiple_attributes none~add_attributes->proc~add_multiple_attributes proc~add_stream_attributes xml_tag%add_stream_attributes none~add_attributes->proc~add_stream_attributes proc~add_multiple_attributes->proc~add_single_attribute proc~add_stream_attributes->proc~add_single_attribute proc~parse xml_tag%parse proc~parse->proc~parse_attributes_names proc~set xml_tag%set proc~set->proc~add_single_attribute proc~set->proc~add_multiple_attributes proc~set->proc~add_stream_attributes proc~create_tag_flat create_tag_flat proc~create_tag_flat->proc~set proc~create_tag_nested create_tag_nested proc~create_tag_nested->proc~set proc~parse_from_string xml_file%parse_from_string proc~parse_from_string->proc~parse proc~search xml_tag%search proc~search->proc~parse program~add_attributes add_attributes program~add_attributes->none~add_attributes program~create_tag create_tag program~create_tag->proc~parse program~create_tag->proc~set interface~xml_tag xml_tag interface~xml_tag->proc~create_tag_flat interface~xml_tag->proc~create_tag_nested proc~get_content xml_tag%get_content proc~get_content->proc~search proc~parse~2 xml_file%parse proc~parse~2->proc~parse_from_string proc~content xml_file%content proc~content->proc~get_content program~delete_tag delete_tag program~delete_tag->proc~parse~2 program~parse_file_simple parse_file_simple program~parse_file_simple->proc~parse~2 program~parse_string_simple parse_string_simple program~parse_string_simple->proc~parse~2 program~write_tag write_tag program~write_tag->proc~parse~2

Source Code

  elemental subroutine alloc_attributes(self, Na)
  !< Allocate (prepare for filling) dynamic memory of attributes.
  class(xml_tag),    intent(inout) :: self     !< XML tag.
  integer(I4P),      intent(in)    :: Na       !< Number of attributes.

  if (allocated(self%attribute)) then
    call self%attribute%free
    deallocate(self%attribute)
  endif
  allocate(self%attribute(1:2, 1:Na))
  self%attributes_number = Na
  endsubroutine alloc_attributes