FTLinkedList Derived Type

type, public, extends(FTObject) :: FTLinkedList


Inherits

type~~ftlinkedlist~~InheritsGraph type~ftlinkedlist FTLinkedList type~ftlinkedlistrecord FTLinkedListRecord type~ftlinkedlist->type~ftlinkedlistrecord head, tail type~ftobject FTObject type~ftlinkedlist->type~ftobject type~ftlinkedlistrecord->type~ftlinkedlistrecord next, previous type~ftlinkedlistrecord->type~ftobject recordObject type~ftlinkedlistrecord->type~ftobject

Inherited by

type~~ftlinkedlist~~InheritedByGraph type~ftlinkedlist FTLinkedList type~ftdictionary FTDictionary type~ftdictionary->type~ftlinkedlist entries type~ftlinkedlistiterator FTLinkedListIterator type~ftlinkedlistiterator->type~ftlinkedlist list type~ftlinkedlistptr FTLinkedListPtr type~ftlinkedlistptr->type~ftlinkedlist list type~ftmultiindextable FTMultiIndexTable type~ftmultiindextable->type~ftlinkedlist table type~ftstack FTStack type~ftstack->type~ftlinkedlist type~ftexception FTException type~ftexception->type~ftdictionary infoDictionary_ type~ftsparsematrix FTSparseMatrix type~ftsparsematrix->type~ftlinkedlistiterator iterator type~ftsparsematrix->type~ftlinkedlistptr table type~ftstringset FTStringSet type~ftstringset->type~ftdictionary dict type~ftvaluedictionary FTValueDictionary type~ftvaluedictionary->type~ftdictionary

Components

Type Visibility Attributes Name Initial
class(FTLinkedListRecord), public, POINTER :: head => NULL()
class(FTLinkedListRecord), public, POINTER :: tail => NULL()
integer, public :: nRecords
logical, public :: isCircular_

Finalization Procedures

final :: destructFTLinkedList

  • public subroutine destructFTLinkedList(self)

    It is automatically called by release().

    Arguments

    Type IntentOptional Attributes Name
    type(FTLinkedList) :: self

Type-Bound Procedures

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.

    Arguments

    Type IntentOptional Attributes Name
    class(FTObject) :: self

    Return Value integer

procedure, public :: init => initFTLinkedList

procedure, public :: add

  • public subroutine add(self, obj)

    Arguments

    Type IntentOptional Attributes Name
    class(FTLinkedList) :: self
    class(FTObject), POINTER :: obj

procedure, public :: remove => removeObject

procedure, public :: reverse => reverseLinkedList

procedure, public :: removeRecord => removeLinkedListRecord

procedure, public :: count => numberOfRecords

procedure, public :: description => FTLinkedListDescription

  • public function FTLinkedListDescription(self)

    Arguments

    Type IntentOptional Attributes Name
    class(FTLinkedList) :: self

    Return Value character(len=DESCRIPTION_CHARACTER_LENGTH)

procedure, public :: printDescription => printFTLinkedListDescription

procedure, public :: className => linkedListClassName

  • public function linkedListClassName(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(FTLinkedList) :: self

    Return Value character(len=CLASS_NAME_CHARACTER_LENGTH)

procedure, public :: allObjects => allLinkedListObjects

procedure, public :: removeAllObjects => removeAllLinkedListObjects

procedure, public :: addObjectsFromList

procedure, public :: makeCircular

  • public subroutine makeCircular(self, circular)

    Arguments

    Type IntentOptional Attributes Name
    class(FTLinkedList) :: self
    logical :: circular

procedure, public :: isCircular

  • public function isCircular(self)

    Arguments

    Type IntentOptional Attributes Name
    class(FTLinkedList) :: self

    Return Value logical

procedure, public :: insertObjectAfterRecord

procedure, public :: insertObjectAfterObject