stringlist_type Derived Type

type, public :: stringlist_type


Inherits

type~~stringlist_type~~InheritsGraph type~stringlist_type stringlist_type type~string_type string_type type~stringlist_type->type~string_type stringarray

Contents

Source Code


Constructor

public interface stringlist_type

Constructor for stringlist Returns an instance of type stringlist_type Specifications

  • private pure function new_stringlist()

    Constructor with no argument Returns a new instance of type stringlist

    Arguments

    None

    Return Value type(stringlist_type)

  • private pure function new_stringlist_carray(array)

    Constructor to convert chararray to stringlist Returns a new instance of type stringlist

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in), dimension(:):: array

    Return Value type(stringlist_type)

  • private pure function new_stringlist_sarray(array)

    Constructor to convert stringarray to stringlist Returns a new instance of type stringlist

    Arguments

    Type IntentOptional AttributesName
    type(string_type), intent(in), dimension(:):: array

    Return Value type(stringlist_type)


Type-Bound Procedures

procedure, public :: clear => clear_list

  • private subroutine clear_list(list)

    Resets stringlist 'list' to an empy stringlist of len 0 Modifies the input stringlist 'list'

    Arguments

    Type IntentOptional AttributesName
    class(stringlist_type), intent(inout) :: list

generic, public :: get => get_string_idx

  • private pure function get_string_idx_wrap(list, idx)

    Returns the string present at stringlist_index 'idx' in stringlist 'list' Returns string_type instance

    Arguments

    Type IntentOptional AttributesName
    class(stringlist_type), intent(in) :: list
    type(stringlist_index_type), intent(in) :: idx

    Return Value type(string_type)

generic, public :: insert_at => insert_at_char_idx, insert_at_string_idx, insert_at_stringlist_idx, insert_at_chararray_idx, insert_at_stringarray_idx

  • private subroutine insert_at_char_idx_wrap(list, idx, string)

    Inserts character scalar 'string' AT stringlist_index 'idx' in stringlist 'list' Modifies the input stringlist 'list'

    Arguments

    Type IntentOptional AttributesName
    class(stringlist_type), intent(inout) :: list
    type(stringlist_index_type), intent(in) :: idx
    character(len=*), intent(in) :: string
  • private subroutine insert_at_string_idx_wrap(list, idx, string)

    Inserts string 'string' AT stringlist_index 'idx' in stringlist 'list' Modifies the input stringlist 'list'

    Arguments

    Type IntentOptional AttributesName
    class(stringlist_type), intent(inout) :: list
    type(stringlist_index_type), intent(in) :: idx
    type(string_type), intent(in) :: string
  • private subroutine insert_at_stringlist_idx_wrap(list, idx, slist)

    Inserts stringlist 'slist' AT stringlist_index 'idx' in stringlist 'list' Modifies the input stringlist 'list'

    Arguments

    Type IntentOptional AttributesName
    class(stringlist_type), intent(inout) :: list
    type(stringlist_index_type), intent(in) :: idx
    type(stringlist_type), intent(in) :: slist
  • private subroutine insert_at_chararray_idx_wrap(list, idx, carray)

    Inserts chararray 'carray' AT stringlist_index 'idx' in stringlist 'list' Modifies the input stringlist 'list'

    Arguments

    Type IntentOptional AttributesName
    class(stringlist_type), intent(inout) :: list
    type(stringlist_index_type), intent(in) :: idx
    character(len=*), intent(in), dimension(:):: carray
  • private subroutine insert_at_stringarray_idx_wrap(list, idx, sarray)

    Inserts stringarray 'sarray' AT stringlist_index 'idx' in stringlist 'list' Modifies the input stringlist 'list'

    Arguments

    Type IntentOptional AttributesName
    class(stringlist_type), intent(inout) :: list
    type(stringlist_index_type), intent(in) :: idx
    type(string_type), intent(in), dimension(:):: sarray

procedure, public :: len => length_list

  • private pure function length_list(list)

    Returns the len (length) of the list Returns an integer

    Arguments

    Type IntentOptional AttributesName
    class(stringlist_type), intent(in) :: list

    Return Value integer

Source Code

    type stringlist_type
        private
        type(string_type), dimension(:), allocatable :: stringarray
    
    contains
        private

        procedure, public :: clear                          =>  clear_list

        procedure, public :: len                            =>  length_list

        procedure         :: to_future_at_idxn              =>  convert_to_future_at_idxn

        procedure         :: to_current_idxn                =>  convert_to_current_idxn

        procedure         :: insert_at_char_idx             =>  insert_at_char_idx_wrap
        procedure         :: insert_at_string_idx           =>  insert_at_string_idx_wrap
        procedure         :: insert_at_stringlist_idx       =>  insert_at_stringlist_idx_wrap
        procedure         :: insert_at_chararray_idx        =>  insert_at_chararray_idx_wrap
        procedure         :: insert_at_stringarray_idx      =>  insert_at_stringarray_idx_wrap
        generic, public   :: insert_at                      =>  insert_at_char_idx,         &
                                                                insert_at_string_idx,       &
                                                                insert_at_stringlist_idx,   &
                                                                insert_at_chararray_idx,    &
                                                                insert_at_stringarray_idx

        procedure         :: insert_before_string_int       =>  insert_before_string_int_impl
        procedure         :: insert_before_stringlist_int   =>  insert_before_stringlist_int_impl
        procedure         :: insert_before_chararray_int    =>  insert_before_chararray_int_impl
        procedure         :: insert_before_stringarray_int  =>  insert_before_stringarray_int_impl
        generic           :: insert_before                  =>  insert_before_string_int,       &
                                                                insert_before_stringlist_int,   &
                                                                insert_before_chararray_int,    &
                                                                insert_before_stringarray_int

        procedure         :: get_string_idx         => get_string_idx_wrap
        generic, public   :: get                    => get_string_idx

    end type stringlist_type