FTDictionary Derived Type

type, public, extends(FTObject) :: FTDictionary


Inherits

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

Inherited by

type~~ftdictionary~~InheritedByGraph type~ftdictionary FTDictionary type~ftexception FTException type~ftexception->type~ftdictionary infoDictionary_ type~ftstringset FTStringSet type~ftstringset->type~ftdictionary dict type~ftvaluedictionary FTValueDictionary type~ftvaluedictionary->type~ftdictionary

Components

Type Visibility Attributes Name Initial
integer, public :: numberOfEntries
logical, public :: isCaseSensitive
type(FTLinkedList), public, DIMENSION(:), POINTER :: entries => NULL()

Finalization Procedures

final :: destructFTDictionary


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 :: initWithSize

  • public subroutine initWithSize(self, sze)

    Arguments

    Type IntentOptional Attributes Name
    class(FTDictionary) :: self
    integer, intent(in) :: sze

procedure, public :: init

  • public subroutine init(self)

    Arguments

    Type IntentOptional Attributes Name
    class(FTDictionary) :: self

procedure, public :: allKeys => AllKeys

  • public function AllKeys(self) result(keys)

    Arguments

    Type IntentOptional Attributes Name
    class(FTDictionary) :: self

    Return Value character(len=FTDICT_KWD_STRING_LENGTH), POINTER, (:)

procedure, public :: allObjects => AllObjects

procedure, public :: addObjectForKey

  • public subroutine addObjectForKey(self, object, key)

    Arguments

    Type IntentOptional Attributes Name
    class(FTDictionary) :: self
    class(FTObject), POINTER :: object
    character(len=*) :: key

procedure, public :: description => FTDictionaryDescription

  • public function FTDictionaryDescription(self)

    Arguments

    Type IntentOptional Attributes Name
    class(FTDictionary) :: self

    Return Value character(len=description_character_length)

procedure, public :: printDescription => printFTDictionaryDescription

procedure, public :: objectForKey

  • public function objectForKey(self, key)

    Arguments

    Type IntentOptional Attributes Name
    class(FTDictionary) :: self
    character(len=*) :: key

    Return Value class(FTObject), POINTER

procedure, public :: containsKey

  • public function containsKey(self, key) result(r)

    Arguments

    Type IntentOptional Attributes Name
    class(FTDictionary) :: self
    character(len=*) :: key

    Return Value logical

procedure, public :: className => dictionaryClassName

  • public function dictionaryClassName(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(FTDictionary) :: self

    Return Value character(len=CLASS_NAME_CHARACTER_LENGTH)

procedure, public :: COUNT

  • public function COUNT(self)

    Arguments

    Type IntentOptional Attributes Name
    class(FTDictionary) :: self

    Return Value integer