libsim Versione 7.2.0

◆ currentbyte()

integer(kind=int_b) function currentbyte ( class(bytelist this)
private

get byte pointed by iterator

Definizione alla linea 102 del file list_byte.F03.

103
119module list_byte
120 use list_abstract
121 use kinds
122 private
123 public :: bytelist
127 type, extends(list) :: bytelist
128#ifdef DOXYGEN
129 integer::none ! doxigen workaround: if missed do not show procedure
130#endif
131 contains
132! procedure :: addByte !< add byte in list
133 procedure :: current => currentbyte
134 procedure :: display => displaybyte
135! generic :: add => addByte
136 end type bytelist
137
138contains
139
141subroutine displaybyte(this)
142class(byteList),intent(inout) :: this
143
144call this%rewind()
145do while(this%element())
146 print *,"index:",this%currentindex()," value:", this%current()
147 call this%next()
148end do
149end subroutine displaybyte
150
151!!$ subroutine addByte(this, value)
152!!$ class(byteList) :: this
153!!$ byte value
154!!$ class(*), allocatable :: v
155!!$
156!!$ allocate(v,source=value)
157!!$ call this%addvalue(v)
158!!$
159!!$ end subroutine addByte
160
161
163integer(kind=int_b) function currentbyte(this)
164class(byteList) :: this
165class(*), pointer :: v
166
167v => this%currentpoli()
168select type(v)
169type is (integer(kind=int_b))
170 currentbyte = v
171end select
172end function currentbyte
173
174end module list_byte
Definition of constants to be used for declaring variables of a desired type.
Definition: kinds.F90:245
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.