An object for stepping through a linked list.
TYPE(FTLinkedListIterator) :: list
CLASS(FTLinkedList) , POINTER :: list
CLASS(FTLinkedListIterator), POINTER :: iterator
ALLOCATE(iterator)
CALL iterator % initWithFTLinkedList(list)
ptr => iterator % list()
ptr => iterator % object()
ptr => iterator % currentRecord()
CLASS(FTObject), POINTER :: objectPtr
CALL iterator % setToStart
DO WHILE (.NOT.iterator % isAtEnd())
objectPtr => iterator % object() ! if the object is wanted
recordPtr => iterator % currentRecord() ! if the record is wanted
Do something with object or record
CALL iterator % moveToNext() ! DON'T FORGET THIS!!
END DO
CALL releaseFTLinkedListIterator(iterator) [Pointers]
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
class(FTLinkedList), | public, | POINTER | :: | list | => | NULL() | |
class(FTLinkedListRecord), | public, | POINTER | :: | current | => | NULL() |
final :: destructIterator |
procedure, public :: description => FTObjectDescription | |
procedure, public :: printDescription => printFTObjectDescription | |
procedure, public, non_overridable :: copy => copyFTObject | |
procedure, public, non_overridable :: retain => retainFTObject | |
procedure, public, non_overridable :: isUnreferenced | |
procedure, public, non_overridable :: refCount | |
procedure, public :: init => initEmpty | |
procedure, public :: initWithFTLinkedList | |
procedure, public :: isAtEnd => FTLinkedListIsAtEnd | |
procedure, public :: object => FTLinkedListObject | |
procedure, public :: currentRecord => FTLinkedListCurrentRecord | |
procedure, public :: linkedList => returnLinkedList | |
procedure, public :: className => linkedListIteratorClassName | |
procedure, public :: setLinkedList | |
procedure, public :: setToStart | |
procedure, public :: moveToNext | |
procedure, public :: removeCurrentRecord |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(FTLinkedListIterator) | :: | self |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(FTLinkedListIterator) | :: | self |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(FTLinkedListIterator) | :: | self |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(FTLinkedListIterator) | :: | self |
Class name returns a string with the name of the type of the object
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(FTLinkedListIterator) | :: | self |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(FTLinkedListIterator) | :: | self |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(FTLinkedListIterator) | :: | self | ||||
class(FTLinkedList), | POINTER | :: | list |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(FTLinkedListIterator), | POINTER | :: | self |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(FTLinkedListIterator) | :: | self |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(FTLinkedListIterator) | :: | self |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(FTLinkedListIterator) | :: | self |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(FTLinkedListIterator) | :: | self |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(FTLinkedListIterator) | :: | self | ||||
class(FTLinkedList), | POINTER | :: | list |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(FTLinkedListIterator) | :: | self |