libsim  Versione7.2.6
list_real.F03
1 
17 module list_real
18  use list_abstract
19  private
20  public :: reallist
24  type, extends(list) :: reallist
25 #ifdef DOXYGEN
26  integer::none ! doxigen workaround: if missed do not show procedure
27 #endif
28  contains
29 ! procedure :: addReal !< add real in list
30  procedure :: current => currentreal
31  procedure :: display => displayreal
32 ! generic :: add => addReal
33  end type reallist
34 
35 contains
36 
38 subroutine displayreal(this)
39 class(realList),intent(inout) :: this
40 
41 call this%rewind()
42 do while(this%element())
43  print *,"index:",this%currentindex()," value:", this%current()
44  call this%next()
45 end do
46 end subroutine displayreal
47 
48 !!$ subroutine addReal(this, value)
49 !!$ class(realList) :: this
50 !!$ real value
51 !!$ class(*), allocatable :: v
52 !!$
53 !!$ allocate(v,source=value)
54 !!$ call this%addvalue(v)
55 !!$
56 !!$ end subroutine addReal
57 
58 
60 real function currentreal(this)
61 class(realList) :: this
62 class(*), pointer :: v
63 
64 v => this%currentpoli()
65 select type(v)
66 type is (real)
67  currentreal = v
68 end select
69 end function currentreal
70 
71 end module list_real
abstract class to use lists in fortran 2003.
Abstract implementation of doubly-linked list.
Real specific implementation of doubly-linked list.
Definition: list_real.F03:77
class to use lists in fortran 2003.
Definition: list_real.F03:70

Generated with Doxygen.