MODFLOW 6  version 6.6.0.dev0
USGS Modular Hydrologic Model
stringlistmodule Module Reference

Functions/Subroutines

subroutine constructcharactercontainer (newCharCont, text)
 
type(characterstringtype) function, pointer castascharacterstringtype (obj)
 
subroutine, public addstringtolist (list, string)
 
character(len=:) function, allocatable, public getstringfromlist (list, indx)
 

Function/Subroutine Documentation

◆ addstringtolist()

subroutine, public stringlistmodule::addstringtolist ( type(listtype), intent(inout)  list,
character(len=*), intent(in)  string 
)

Definition at line 35 of file StringList.f90.

36  implicit none
37  ! -- dummy
38  type(ListType), intent(inout) :: list
39  character(len=*), intent(in) :: string
40  ! -- local
41  class(*), pointer :: obj
42  type(CharacterStringType), pointer :: newCharacterContainer
43  !
44  newcharactercontainer => null()
45  call constructcharactercontainer(newcharactercontainer, string)
46  if (associated(newcharactercontainer)) then
47  obj => newcharactercontainer
48  call list%Add(obj)
49  end if
Here is the call graph for this function:

◆ castascharacterstringtype()

type(characterstringtype) function, pointer stringlistmodule::castascharacterstringtype ( class(*), intent(inout), pointer  obj)
private

Definition at line 21 of file StringList.f90.

22  implicit none
23  class(*), pointer, intent(inout) :: obj
24  type(CharacterStringType), pointer :: res
25  !
26  res => null()
27  if (.not. associated(obj)) return
28  !
29  select type (obj)
30  type is (characterstringtype)
31  res => obj
32  end select
Here is the caller graph for this function:

◆ constructcharactercontainer()

subroutine stringlistmodule::constructcharactercontainer ( type(characterstringtype), intent(out), pointer  newCharCont,
character(len=*), intent(in)  text 
)
private

Definition at line 12 of file StringList.f90.

13  implicit none
14  type(CharacterStringType), pointer, intent(out) :: newCharCont
15  character(len=*), intent(in) :: text
16  !
17  allocate (newcharcont)
18  newcharcont = text
Here is the caller graph for this function:

◆ getstringfromlist()

character(len=:) function, allocatable, public stringlistmodule::getstringfromlist ( type(listtype), intent(inout)  list,
integer(i4b), intent(in)  indx 
)

Definition at line 52 of file StringList.f90.

53  implicit none
54  ! -- dummy
55  type(ListType), intent(inout) :: list
56  integer(I4B), intent(in) :: indx
57  character(len=:), allocatable :: string
58  ! -- local
59  class(*), pointer :: obj
60  type(CharacterStringType), pointer :: charcont
61  !
62  obj => list%GetItem(indx)
63  charcont => castascharacterstringtype(obj)
64  if (associated(charcont)) then
65  allocate (character(len=charcont%strlen()) :: string)
66  string(:) = charcont
67  else
68  string = ''
69  end if
Here is the call graph for this function: