Module dcstring_list

module dcstring_list

        ! Uses
    use dcstring_base

        ! Types
    private type STRING_NODE
    public type STRING_LIST

        ! Interfaces
    public interface init
    public interface clear
    public interface dispose
    public interface len
    public interface push
    public interface pop
    public interface shift
    public interface unshift
    public interface extract
    public interface element
    private interface copy
    public interface split

        ! Subroutines and functions
    private subroutine init_vs (vs)
    private subroutine copy_vs (lhs, rhs, items)
    private subroutine clear_vs (vs)
    private subroutine dispose_vs (vs)
    private integer function len_vs (vs)
    private type (VSTRING) function element_vs (vs, pos)
    private function extract_vs (vs, start, finish) result (result)
    private subroutine push_vs (vs, string)
    private subroutine push_vc (vs, string)
    private type (VSTRING) function pop_vs (vs)
    private type (VSTRING) function shift_vs (vs)
    private subroutine unshift_vs (vs, string)
    private subroutine VstSplit (LIST, string, fs)
    private subroutine CharSplit (list, string, fs)

end module dcstring_list

Description of Types

STRING_NODE

private type STRING_NODE
    type (VSTRING) :: body
    type (STRING_NODE), pointer :: next
end type STRING_NODE

STRING_LIST

public type STRING_LIST
    private
    type (STRING_NODE), pointer :: head
end type STRING_LIST

Description of Interfaces

init

public interface init
    module procedure init_vs
end interface init

clear

public interface clear
    module procedure clear_vs
end interface clear

dispose

public interface dispose
    module procedure dispose_vs
end interface dispose

len

public interface len
    module procedure len_vs
end interface len

push

public interface push
    module procedure push_vs
    module procedure push_vc
end interface push

pop

public interface pop
    module procedure pop_vs
end interface pop

shift

public interface shift
    module procedure shift_vs
end interface shift

unshift

public interface unshift
    module procedure unshift_vs
end interface unshift

extract

public interface extract
    module procedure extract_vs
end interface extract

element

public interface element
    module procedure element_vs
end interface element

copy

private interface copy
    module procedure copy_vs
end interface copy

split

public interface split
    module procedure CharSplit
    module procedure VstSplit
end interface split

Description of Subroutines and Functions

init_vs

private subroutine init_vs (vs)
    type (STRING_LIST), intent(out) :: vs
end subroutine init_vs

copy_vs

private subroutine copy_vs (lhs, rhs, items)
    type (STRING_LIST), intent(inout) :: lhs
    type (STRING_LIST), intent(in) :: rhs
    integer, optional, intent(in) :: items
end subroutine copy_vs

clear_vs

private subroutine clear_vs (vs)
    type (STRING_LIST), intent(inout) :: vs
end subroutine clear_vs

dispose_vs

private subroutine dispose_vs (vs)
    type (STRING_LIST), intent(inout) :: vs
end subroutine dispose_vs

len_vs

private function len_vs (vs) result (result)
    type (STRING_LIST), intent(in) :: vs
    integer :: result
end function len_vs

element_vs

private function element_vs (vs, pos) result (result)
    type (STRING_LIST), intent(in) :: vs
    integer, intent(in) :: pos
    type (VSTRING) :: result
end function element_vs

extract_vs

private function extract_vs (vs, start, finish) result (result)
    type (STRING_LIST), intent(in) :: vs
    integer, optional, intent(in) :: start
    integer, optional, intent(in) :: finish
    type (STRING_LIST) :: result
    ! Calls: copy_vs
end function extract_vs

push_vs

private subroutine push_vs (vs, string)
    type (STRING_LIST), intent(inout) :: vs
    type (VSTRING), intent(in) :: string
end subroutine push_vs

push_vc

private subroutine push_vc (vs, string)
    type (STRING_LIST), intent(inout) :: vs
    character (len=*), intent(in) :: string
end subroutine push_vc

pop_vs

private function pop_vs (vs) result (result)
    type (STRING_LIST), intent(inout) :: vs
    type (VSTRING) :: result
end function pop_vs

shift_vs

private function shift_vs (vs) result (result)
    type (STRING_LIST), intent(inout) :: vs
    type (VSTRING) :: result
end function shift_vs

unshift_vs

private subroutine unshift_vs (vs, string)
    type (STRING_LIST), intent(inout) :: vs
    type (VSTRING), intent(in) :: string
end subroutine unshift_vs

VstSplit

private subroutine VstSplit (LIST, string, fs)
    type (STRING_LIST), intent(out) :: LIST
    type (VSTRING), intent(in) :: string
    character (len=*), intent(in) :: FS
    ! Calls: init, push
end subroutine VstSplit

CharSplit

private subroutine CharSplit (list, string, fs)
    type (STRING_LIST), intent(out) :: list
    character (len=*), intent(in) :: string
    character (len=*), intent(in) :: FS
    ! Calls: init, push
end subroutine CharSplit