FTLinkedListIterator Derived Type

type, public, extends(FTObject) :: FTLinkedListIterator


Components

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

Type-Bound Procedures

procedure, public :: description => FTObjectDescription

  • public function FTObjectDescription(self)

    Returns a character string of length DESCRIPTION_CHARACTER_LENGTH that represents the object. the base class implementation returns an empty string. Note that if the description is too long, the expected string will be truncated. In general, one wants to use printDescription.

    Read more…

    Arguments

    Type IntentOptional Attributes Name
    class(FTObject) :: self

    Return Value character(len=DESCRIPTION_CHARACTER_LENGTH)

procedure, public :: printDescription => printFTObjectDescription

procedure, public, non_overridable :: copy => copyFTObject

  • private function copyFTObject(self) result(copy)

    Base class implementation of the assignment function. Call this from within any subclasses copy assignment function. All FTObject's implementation does is set the reference count to one, implying no additional ownership to the caller that is creating the copy.


    Arguments

    Type IntentOptional Attributes Name
    class(FTObject), intent(in) :: self

    Return Value class(FTObject), POINTER

procedure, public, non_overridable :: retain => retainFTObject

  • public subroutine retainFTObject(self)

    Retain increases the reference count by one and implies ownership to the caller. ### Usage: CALL obj\ % retain()

    Arguments

    Type IntentOptional Attributes Name
    class(FTObject) :: self

procedure, public, non_overridable :: isUnreferenced

  • public function isUnreferenced(self)

    Owners of objects should call isUnreferenced after releasing a pointer object. If true, the object should be deallocated and then set to point to NULL()

    Read more…

    Arguments

    Type IntentOptional Attributes Name
    class(FTObject) :: self

    Return Value logical

procedure, public, non_overridable :: refCount

  • public function refCount(self)

    Returns the reference count for the object. Normally this is done only for debugging purposes.

    Read more…

    Arguments

    Type IntentOptional Attributes Name
    class(FTObject) :: self

    Return Value integer

procedure, public :: init => initEmpty

procedure, public :: initWithFTLinkedList

procedure, public :: destruct => destructIterator

  • public subroutine destructIterator(self)

    The destructor must not be called except at the end of destructors of subclasses.

    Arguments

    Type IntentOptional Attributes Name
    class(FTLinkedListIterator) :: self

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