FTLinkedListIteratorClass Module

An object for stepping through a linked list.

Definition (Subclass of FTObject):

TYPE(FTLinkedListIterator) :: list

Initialization

     CLASS(FTLinkedList)        , POINTER :: list
     CLASS(FTLinkedListIterator), POINTER :: iterator
     ALLOCATE(iterator)
     CALL iterator % initWithFTLinkedList(list)

Accessors

     ptr => iterator % list()
     ptr => iterator % object()
     ptr => iterator % currentRecord()

Iterating

     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

Destruction

     CALL releaseFTLinkedListIterator(iterator) [Pointers]

Uses

  • module~~ftlinkedlistiteratorclass~~UsesGraph module~ftlinkedlistiteratorclass FTLinkedListIteratorClass module~ftlinkedlistclass FTLinkedListClass module~ftlinkedlistiteratorclass->module~ftlinkedlistclass module~ftlinkedlistrecordclass FTLinkedListRecordClass module~ftlinkedlistclass->module~ftlinkedlistrecordclass module~ftmutableobjectarrayclass FTMutableObjectArrayClass module~ftlinkedlistclass->module~ftmutableobjectarrayclass module~ftobjectclass FTObjectClass module~ftlinkedlistrecordclass->module~ftobjectclass module~ftmutableobjectarrayclass->module~ftobjectclass

Used by

  • module~~ftlinkedlistiteratorclass~~UsedByGraph module~ftlinkedlistiteratorclass FTLinkedListIteratorClass module~ftdictionaryclass FTDictionaryClass module~ftdictionaryclass->module~ftlinkedlistiteratorclass module~ftexceptionclass FTExceptionClass module~ftexceptionclass->module~ftlinkedlistiteratorclass module~ftexceptionclass->module~ftdictionaryclass module~ftvaluedictionaryclass FTValueDictionaryClass module~ftexceptionclass->module~ftvaluedictionaryclass module~ftobjectlibrary FTObjectLibrary module~ftobjectlibrary->module~ftlinkedlistiteratorclass module~ftobjectlibrary->module~ftdictionaryclass module~ftobjectlibrary->module~ftexceptionclass module~ftsparsematrixclass FTSparseMatrixClass module~ftobjectlibrary->module~ftsparsematrixclass module~ftobjectlibrary->module~ftvaluedictionaryclass module~ftsparsematrixclass->module~ftlinkedlistiteratorclass module~ftstringsetclass FTStringSetClass module~ftstringsetclass->module~ftdictionaryclass module~ftvaluedictionaryclass->module~ftdictionaryclass module~sharedexceptionmanagermodule SharedExceptionManagerModule module~sharedexceptionmanagermodule->module~ftexceptionclass

Derived Types

type, public, extends(FTObject) ::  FTLinkedListIterator

Components

Type Visibility Attributes Name Initial
class(FTLinkedList), public, POINTER :: list => NULL()
class(FTLinkedListRecord), public, POINTER :: current => NULL()

Finalizations Procedures

final :: destructIterator

Type-Bound Procedures

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

Functions

public function FTLinkedListIsAtEnd(self)

Arguments

Type IntentOptional Attributes Name
class(FTLinkedListIterator) :: self

Return Value logical

public function returnLinkedList(self) result(o)

Arguments

Type IntentOptional Attributes Name
class(FTLinkedListIterator) :: self

Return Value class(FTLinkedList), POINTER

public function FTLinkedListObject(self) result(o)

Arguments

Type IntentOptional Attributes Name
class(FTLinkedListIterator) :: self

Return Value class(FTObject), POINTER

public function FTLinkedListCurrentRecord(self) result(o)

Arguments

Type IntentOptional Attributes Name
class(FTLinkedListIterator) :: self

Return Value class(FTLinkedListRecord), POINTER

public function linkedListIteratorClassName(self) result(s)

Class name returns a string with the name of the type of the object

Read more…

Arguments

Type IntentOptional Attributes Name
class(FTLinkedListIterator) :: self

Return Value character(len=CLASS_NAME_CHARACTER_LENGTH)


Subroutines

public subroutine initEmpty(self)

Arguments

Type IntentOptional Attributes Name
class(FTLinkedListIterator) :: self

public subroutine initWithFTLinkedList(self, list)

Arguments

Type IntentOptional Attributes Name
class(FTLinkedListIterator) :: self
class(FTLinkedList), POINTER :: list

public subroutine releaseFTLinkedListIterator(self)

Arguments

Type IntentOptional Attributes Name
type(FTLinkedListIterator), POINTER :: self

public subroutine destructIterator(self)

Arguments

Type IntentOptional Attributes Name
type(FTLinkedListIterator) :: self

public subroutine releaseMemberList(self)

Arguments

Type IntentOptional Attributes Name
class(FTLinkedListIterator) :: self

public subroutine setToStart(self)

Arguments

Type IntentOptional Attributes Name
class(FTLinkedListIterator) :: self

public subroutine moveToNext(self)

Arguments

Type IntentOptional Attributes Name
class(FTLinkedListIterator) :: self

public subroutine setLinkedList(self, list)

Arguments

Type IntentOptional Attributes Name
class(FTLinkedListIterator) :: self
class(FTLinkedList), POINTER :: list

public subroutine removeCurrentRecord(self)

Arguments

Type IntentOptional Attributes Name
class(FTLinkedListIterator) :: self