libsim  Versione 7.1.6
list_mix.F03
1 
17 module list_mix
18 use list_abstract
19 use kinds
20 private
24 type,public,extends(list) :: mixlist
25 #ifdef DOXYGEN
26  integer::none ! doxigen workaround: if missed do not show procedure
27 #endif
28  contains
29  procedure :: current => currentmix
30  procedure :: display => displaymix
31 end type mixlist
32 
33 contains
34 
36 subroutine displaymix(this)
37 class(mixList) :: this
38 class(*), pointer :: curr
39 logical :: found
40 
41 call this%rewind()
42 do while(this%element())
43  curr => this%Currentpoli()
44  found=.false.
45  select type(curr)
46  type is (integer)
47  print *,curr
48  found=.true.
49  type is (real)
50  print *,curr
51  found=.true.
52  type is (doubleprecision)
53  print *,curr
54  found=.true.
55  type is (integer(kind=int_b))
56  print *,curr
57  found=.true.
58  type is (character(*))
59  print *,curr
60  found=.true.
61  end select
62 
63  if (.not. found) then
64  print *, "not supported type for display"
65  end if
66 
67  call this%next()
68 end do
69 call this%rewind()
70 end subroutine displaymix
71 
72 
74 function currentmix(this)
75 class(mixlist) :: this
76 class(*), pointer :: currentmix
77 currentmix => this%currentpoli()
78 end function currentmix
79 
80 
81 end module list_mix
82 
Definition of constants to be used for declaring variables of a desired type.
Definition: kinds.F90:251
abstract class to use lists in fortran 2003.
class to use lists in fortran 2003.
Definition: list_mix.F03:58
Abstract implementation of doubly-linked list.
Non type specific implementation of doubly-linked list.
Definition: list_mix.F03:65

Generated with Doxygen.