FTLinkedList is a container class that stores objects in a linked list.
Inherits from FTObjectClass
Definition (Subclass of FTObject):
TYPE(FTLinkedList) :: list
Usage:
Initialization
CLASS(FTLinkedList), POINTER :: list
ALLOCATE(list)
CALL list % init
Adding objects
CLASS ( FTLinkedList ) , POINTER :: list , listToAdd
CLASS ( FTObject ) , POINTER :: objectPtr
objectPtr => r ! r is subclass of FTObject
CALL list % Add ( objectPtr ) ! Pointer is retained by list
CALL release ( r ) ! If caller relinquishes ownership
CALL list % addObjectsFromList ( listToAdd )
Inserting objects
CLASS ( FTLinkedList ) , POINTER :: list
CLASS ( FTObject ) , POINTER :: objectPtr , obj
CLASS ( FTLinkedListRecord ) , POINTER :: record
objectPtr => r ! r is subclass of FTObject
CALL list % insertObjectAfterRecord ( objectPtr ,record ) ! Pointer is retained by list
CALL release ( r ) ! If caller reliquishes ownership
objectPtr => r ! r is subclass of FTObject
CALL list % insertObjectAfterObject ( objectPtr ,obj ) ! Pointer is retained by list
CALL release ( r ) ! If caller reliquishes ownership
Removing objects
CLASS(FTLinkedList), POINTER :: list
CLASS(FTObject) , POINTER :: objectPtr
objectPtr => r ! r is subclass of FTObject
CALL list % remove(objectPtr)
Getting all objects as an object array
CLASS(FTLinkedList) , POINTER :: list
CLASS(FTMutableObjectArray), POINTER :: array
array => list % allObjects() ! Array has refCount = 1
Counting the number of objects in the list
Destruction
CALL releaseFTLinkedList ( list ) [ Pointers ]
!
module~~ftlinkedlistclass~~UsesGraph
module~ftlinkedlistclass
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
Nodes of different colours represent the following:
Graph Key
Module
Module
Submodule
Submodule
Subroutine
Subroutine
Function
Function
Program
Program
This Page's Entity
This Page's Entity
Solid arrows point from a submodule to the (sub)module which it is
descended from. Dashed arrows point from a module or program unit to
modules which it uses.
module~~ftlinkedlistclass~~UsedByGraph
module~ftlinkedlistclass
FTLinkedListClass
module~ftdictionaryclass
FTDictionaryClass
module~ftdictionaryclass->module~ftlinkedlistclass
module~ftlinkedlistiteratorclass
FTLinkedListIteratorClass
module~ftdictionaryclass->module~ftlinkedlistiteratorclass
module~ftlinkedlistiteratorclass->module~ftlinkedlistclass
module~ftmultiindextableclass
FTMultiIndexTableClass
module~ftmultiindextableclass->module~ftlinkedlistclass
module~ftobjectlibrary
FTObjectLibrary
module~ftobjectlibrary->module~ftlinkedlistclass
module~ftobjectlibrary->module~ftdictionaryclass
module~ftobjectlibrary->module~ftlinkedlistiteratorclass
module~ftsparsematrixclass
FTSparseMatrixClass
module~ftobjectlibrary->module~ftsparsematrixclass
module~ftstackclass
FTStackClass
module~ftobjectlibrary->module~ftstackclass
module~ftexceptionclass
FTExceptionClass
module~ftobjectlibrary->module~ftexceptionclass
module~ftvaluedictionaryclass
FTValueDictionaryClass
module~ftobjectlibrary->module~ftvaluedictionaryclass
module~ftsparsematrixclass->module~ftlinkedlistclass
module~ftsparsematrixclass->module~ftlinkedlistiteratorclass
module~ftstackclass->module~ftlinkedlistclass
module~ftexceptionclass->module~ftdictionaryclass
module~ftexceptionclass->module~ftlinkedlistiteratorclass
module~ftexceptionclass->module~ftstackclass
module~ftexceptionclass->module~ftvaluedictionaryclass
module~ftstringsetclass
FTStringSetClass
module~ftstringsetclass->module~ftdictionaryclass
module~ftvaluedictionaryclass->module~ftdictionaryclass
module~sharedexceptionmanagermodule
SharedExceptionManagerModule
module~sharedexceptionmanagermodule->module~ftexceptionclass
Nodes of different colours represent the following:
Graph Key
Module
Module
Submodule
Submodule
Subroutine
Subroutine
Function
Function
Program
Program
This Page's Entity
This Page's Entity
Solid arrows point from a submodule to the (sub)module which it is
descended from. Dashed arrows point from a module or program unit to
modules which it uses.
Interfaces
Arguments
Type
Intent Optional Attributes
Name
class(FTObject ),
POINTER
::
obj
class(FTLinkedList ),
POINTER
::
cast
Derived Types
Components
Type
Visibility Attributes
Name
Initial
class(FTLinkedListRecord ),
public,
POINTER
::
head
=>
NULL()
class(FTLinkedListRecord ),
public,
POINTER
::
tail
=>
NULL()
integer,
public
::
nRecords
logical,
public
::
isCircular_
Finalizations Procedures
final :: destructFTLinkedList
Type-Bound Procedures
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 => initFTLinkedList
procedure, public ::
add
procedure, public ::
remove => removeObject
procedure, public ::
reverse => reverseLinkedList
procedure, public ::
removeRecord => removeLinkedListRecord
procedure, public ::
count => numberOfRecords
procedure, public ::
description => FTLinkedListDescription
procedure, public ::
printDescription => printFTLinkedListDescription
procedure, public ::
className => linkedListClassName
procedure, public ::
allObjects => allLinkedListObjects
procedure, public ::
removeAllObjects => removeAllLinkedListObjects
procedure, public ::
addObjectsFromList
procedure, public ::
makeCircular
procedure, public ::
isCircular
procedure, public ::
insertObjectAfterRecord
procedure, public ::
insertObjectAfterObject
Functions
Arguments
Type
Intent Optional Attributes
Name
class(FTLinkedList )
::
self
Return Value
logical
Arguments
Type
Intent Optional Attributes
Name
class(FTLinkedList )
::
self
Return Value
integer
Arguments
Type
Intent Optional Attributes
Name
class(FTLinkedList )
::
self
Return Value
character(len=DESCRIPTION_CHARACTER_LENGTH)
Arguments
Type
Intent Optional Attributes
Name
class(FTLinkedList )
::
self
Class name returns a string with the name of the type of the object
Read more…
Arguments
Type
Intent Optional Attributes
Name
class(FTLinkedList )
::
self
Return Value
character(len=CLASS_NAME_CHARACTER_LENGTH)
Arguments
Type
Intent Optional Attributes
Name
class(FTObject ),
POINTER
::
obj
Return Value
class(FTLinkedList ), POINTER
Subroutines
Arguments
Type
Intent Optional Attributes
Name
class(FTLinkedList )
::
self
Arguments
Type
Intent Optional Attributes
Name
class(FTLinkedList )
::
self
logical
::
circular
Arguments
Type
Intent Optional Attributes
Name
class(FTLinkedList )
::
self
Arguments
Type
Intent Optional Attributes
Name
class(FTLinkedList ),
POINTER
::
self
It is automatically called by release().
Arguments
Type
Intent Optional Attributes
Name
type(FTLinkedList )
::
self
Arguments
Type
Intent Optional Attributes
Name
class(FTLinkedList )
::
self
integer
::
iUnit
Arguments
Type
Intent Optional Attributes
Name
class(FTLinkedList )
::
self
Arguments
Type
Intent Optional Attributes
Name
class(FTObject ),
POINTER
::
obj
class(FTLinkedList ),
POINTER
::
cast