FTValue Derived Type

type, public, extends(FTObject) :: FTValue


Type-Bound Procedures

procedure, public :: init => initFTObject

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

generic, public :: initWithValue => initWithReal, initWithDoublePrecision, initWithString, initWithLogical, initWithInteger

  • public subroutine initWithReal(self, v)

    Public, generic name: initwithValue()

    Read more…

    Arguments

    Type IntentOptional Attributes Name
    class(FTValue) :: self
    real :: v
  • public subroutine initWithDoublePrecision(self, v)

    Public, generic name: initwithValue()

    Read more…

    Arguments

    Type IntentOptional Attributes Name
    class(FTValue) :: self
    doubleprecision :: v
  • public subroutine initWithString(self, v)

    Public, generic name: initwithValue()

    Read more…

    Arguments

    Type IntentOptional Attributes Name
    class(FTValue) :: self
    character(len=*) :: v
  • public subroutine initWithLogical(self, v)

    Public, generic name: initwithValue()

    Read more…

    Arguments

    Type IntentOptional Attributes Name
    class(FTValue) :: self
    logical :: v
  • public subroutine initWithInteger(self, v)

    Public, generic name: initwithValue()

    Read more…

    Arguments

    Type IntentOptional Attributes Name
    class(FTValue) :: self
    integer :: v

generic, public :: initWithValue => initWithQuad

  • public subroutine initWithQuad(self, v)

    Public, generic name: initwithValue()

    Read more…

    Arguments

    Type IntentOptional Attributes Name
    class(FTValue) :: self
    real(kind=SELECTED_REAL_KIND(QUAD_DIGITS)) :: v

procedure, public :: destruct => destructValue

procedure, public :: realValue

  • public function realValue(self)

    Get the real value stored in the object, or convert the value in the object to a real if it is of a different type.

    Arguments

    Type IntentOptional Attributes Name
    class(FTValue) :: self

    Return Value real

procedure, public :: doublePrecisionValue

  • public function doublePrecisionValue(self)

    Get the double precision value stored in the object, or convert the value in the object to a double precision if it is of a different type.

    Arguments

    Type IntentOptional Attributes Name
    class(FTValue) :: self

    Return Value doubleprecision

procedure, public :: quadValue

  • public function quadValue(self)

    Get the double precision value stored in the object, or convert the value in the object to a double precision if it is of a different type.

    Arguments

    Type IntentOptional Attributes Name
    class(FTValue) :: self

    Return Value doubleprecision

procedure, public :: stringValue

  • public function stringValue(self, requestedLength) result(s)

    Get the string value of length requestedLength stored in the object, or convert the value in the object to a string of that length if it is of a different type.

    Arguments

    Type IntentOptional Attributes Name
    class(FTValue) :: self
    integer :: requestedLength

    Return Value character(len=requestedLength)

procedure, public :: logicalValue

  • public function logicalValue(self)

    Get the logical value stored in the object, or convert the value in the object to a logical if it is of a different type.

    Arguments

    Type IntentOptional Attributes Name
    class(FTValue) :: self

    Return Value logical

procedure, public :: integerValue

  • public function integerValue(self)

    Get the integer value stored in the object, or convert the value in the object to an integer if it is of a different type.

    Arguments

    Type IntentOptional Attributes Name
    class(FTValue) :: self

    Return Value integer

procedure, public :: description => FTValueDescription

  • public function FTValueDescription(self)

    Returns the description of the value. In this case, it returns the stringValue() of the object.

    Arguments

    Type IntentOptional Attributes Name
    class(FTValue) :: self

    Return Value character(len=DESCRIPTION_CHARACTER_LENGTH)

procedure, public :: printDescription => printValueDescription

  • public subroutine printValueDescription(self, iUnit)

    Prints the description of the value to unit iUnit. In this case, it prints
    the stringValue() of the object.

    Arguments

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

procedure, public :: className => valueClassName

  • public function valueClassName(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(FTValue) :: self

    Return Value character(len=CLASS_NAME_CHARACTER_LENGTH)