FTStringSet Derived Type

type, public, extends(FTObject) :: FTStringSet


Inherits

type~~ftstringset~~InheritsGraph type~ftstringset FTStringSet type~ftdictionary FTDictionary type~ftstringset->type~ftdictionary dict type~ftobject FTObject type~ftstringset->type~ftobject type~ftdictionary->type~ftobject type~ftlinkedlist FTLinkedList type~ftdictionary->type~ftlinkedlist entries 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

Finalization Procedures

final :: destructFTStringSet

  • public subroutine destructFTStringSet(self)

    Destructor for the class. This is called automatically when the reference count reaches zero. Do not call this yourself on pointers

    Arguments

    Type IntentOptional Attributes Name
    type(FTStringSet) :: self

Type-Bound Procedures

procedure, public :: init => initFTObject

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.

    Arguments

    Type IntentOptional Attributes Name
    class(FTObject) :: self

    Return Value character(len=DESCRIPTION_CHARACTER_LENGTH)

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

  • public subroutine initFTStringSet(self, FTStringSetSize)

    Designated initializer. Initializes the amount of storage, but the FTStringSet remains empty.

    Read more…

    Arguments

    Type IntentOptional Attributes Name
    class(FTStringSet) :: self
    integer :: FTStringSetSize

procedure, public :: initWithStrings

  • public subroutine initWithStrings(self, strings)

    initializer. Initializes the amount of storage from the strings passed Usage CLASS(FTStringSet) :: FTStringSet CHARACTER(LEN=) :: strings(:) CALL FTStringSet % initWithStrings(strings)

    Arguments

    Type IntentOptional Attributes Name
    class(FTStringSet) :: self
    character(len=*) :: strings(:)

procedure, public :: addString => AddString

  • public subroutine AddString(self, str)

    AddString adds a string to the set if it is not already present

    Read more…

    Arguments

    Type IntentOptional Attributes Name
    class(FTStringSet) :: self
    character(len=*) :: str

procedure, public :: containsString

  • public function containsString(self, str)

    containsString returns .TRUE. if the set contains the string, .FALSE. otherwise.

    Read more…

    Arguments

    Type IntentOptional Attributes Name
    class(FTStringSet) :: self
    character(len=*) :: str

    Return Value logical

procedure, public :: strings

  • public function strings(self) result(s)

    strings returns a pointer to an array of strings that are in the set. Deallocate this array when done with it.

    Read more…

    Arguments

    Type IntentOptional Attributes Name
    class(FTStringSet) :: self

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

procedure, public :: unionWithSet

  • public function unionWithSet(self, set) result(newSet)

    unionWithSet returns a pointer to a new set that is the union of two sets. the new set has reference count of 1. Release when done.

    Read more…

    Arguments

    Type IntentOptional Attributes Name
    class(FTStringSet) :: self
    class(FTStringSet) :: set

    Return Value type(FTStringSet), POINTER

procedure, public :: intersectionWithSet

  • public function intersectionWithSet(self, set) result(newSet)

    intersectionWithSet returns a pointer to a new set that is the intersection of two sets. the new set has reference count of 1. Release when done.

    Read more…

    Arguments

    Type IntentOptional Attributes Name
    class(FTStringSet) :: self
    class(FTStringSet) :: set

    Return Value type(FTStringSet), POINTER

procedure, public :: setFromDifference

  • public function setFromDifference(self, set) result(newSet)

    setFromDifference returns a pointer to a new set that is the difference of two sets. the new set has reference count of 1. Release when done.

    Read more…

    Arguments

    Type IntentOptional Attributes Name
    class(FTStringSet) :: self
    class(FTStringSet) :: set

    Return Value type(FTStringSet), POINTER

procedure, public :: isEmpty

  • public function isEmpty(self)

    Arguments

    Type IntentOptional Attributes Name
    class(FTStringSet) :: self

    Return Value logical

procedure, public :: count => stringCount

  • public function stringCount(self)

    Arguments

    Type IntentOptional Attributes Name
    class(FTStringSet) :: self

    Return Value integer

procedure, public :: printDescription => printFTStringSet

  • public subroutine printFTStringSet(self, iUnit)

    Arguments

    Type IntentOptional Attributes Name
    class(FTStringSet) :: self
    integer :: iUnit

procedure, public :: className => FTStringSetClassName

  • public function FTStringSetClassName(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(FTStringSet) :: self

    Return Value character(len=CLASS_NAME_CHARACTER_LENGTH)