libsim Versione 7.1.11
list_byte.F03
1
17module list_byte
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
36contains
37
39subroutine displaybyte(this)
40class(byteList),intent(inout) :: this
41
42call this%rewind()
43do while(this%element())
44 print *,"index:",this%currentindex()," value:", this%current()
45 call this%next()
46end do
47end 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
59
61integer(kind=int_b) function currentbyte(this)
62class(byteList) :: this
63class(*), pointer :: v
64
65v => this%currentpoli()
66select type(v)
67type is (integer(kind=int_b))
68 currentbyte = v
69end select
70end function currentbyte
71
72end 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.