libsim Versione 7.2.1
|
◆ constructor()
Constructor.
Definizione alla linea 105 del file list_linkchar.F03. 106
113 parameter(listcharmaxlen=10)
114
115 private
119 private
120 character(len=listcharmaxlen) :: value = ""
121 type(link), pointer :: next => null()
122 type(link), pointer :: prev => null()
123 contains
124 procedure :: getValue
125 procedure :: nextLink
126 procedure :: prevLink
127 procedure :: setNextLink
128 procedure :: setPrevLink
130
133 procedure constructor
134 end interface
135
136contains
137
138function nextlink(this)
139class(link) :: this
140class(link), pointer :: nextLink
141nextlink => this%next
142end function nextlink
143
144function prevlink(this)
145class(link) :: this
146class(link), pointer :: prevLink
147prevlink => this%prev
148end function prevlink
149
150subroutine setnextlink(this,next)
151class(link) :: this
152type(link), pointer :: next
153this%next => next
154end subroutine setnextlink
155
156subroutine setprevlink(this,prev)
157class(link) :: this
158type(link), pointer :: prev
159this%prev => prev
160end subroutine setprevlink
161
162function getvalue(this)
163class(link) :: this
164character(len=listcharmaxlen) :: getValue
165getvalue = this%value
166end function getvalue
167
169function constructor(value)
170type(link),pointer :: constructor
171character (len=*) :: value
172
173allocate(constructor)
174constructor%prev => null()
175constructor%next => null()
176constructor%value=value
177
178end function constructor
179
|