libsim  Versione 7.1.7
list_byte.F03
1 
17 module list_byte
18  use list_abstract
19  use kinds
20  private
21  public :: bytelist
25  type, extends(list) :: bytelist
26 #ifdef DOXYGEN
27  integer::none ! doxigen workaround: if missed do not show procedure
28 #endif
29  contains
30 ! procedure :: addByte !< add byte in list
31  procedure :: current => currentbyte
32  procedure :: display => displaybyte
33 ! generic :: add => addByte
34  end type bytelist
35 
36 contains
37 
39 subroutine displaybyte(this)
40 class(byteList),intent(inout) :: this
41 
42 call this%rewind()
43 do while(this%element())
44  print *,"index:",this%currentindex()," value:", this%current()
45  call this%next()
46 end do
47 end subroutine displaybyte
48 
49 !!$ subroutine addByte(this, value)
50 !!$ class(byteList) :: this
51 !!$ byte value
52 !!$ class(*), allocatable :: v
53 !!$
54 !!$ allocate(v,source=value)
55 !!$ call this%addvalue(v)
56 !!$
57 !!$ end subroutine addByte
58 
59 
61 integer(kind=int_b) function currentbyte(this)
62 class(byteList) :: this
63 class(*), pointer :: v
64 
65 v => this%currentpoli()
66 select type(v)
67 type is (integer(kind=int_b))
68  currentbyte = v
69 end select
70 end function currentbyte
71 
72 end module list_byte
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_byte.F03:58
Abstract implementation of doubly-linked list.
Byte specific implementation of doubly-linked list.
Definition: list_byte.F03:66

Generated with Doxygen.