MODFLOW 6  version 6.5.0.dev2
MODFLOW 6 Code Documentation
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 37 of file StringList.f90.

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

◆ castascharacterstringtype()

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

Definition at line 22 of file StringList.f90.

23  implicit none
24  class(*), pointer, intent(inout) :: obj
25  type(CharacterStringType), pointer :: res
26  !
27  res => null()
28  if (.not. associated(obj)) return
29  !
30  select type (obj)
31  type is (characterstringtype)
32  res => obj
33  end select
34  return
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
19  return
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 56 of file StringList.f90.

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