Attribute Derived Type

type, public, extends(UnlimitedEntity) :: Attribute


Inherits

type~~attribute~~InheritsGraph type~attribute Attribute type~unlimitedentity UnlimitedEntity type~attribute->type~unlimitedentity

Inherited by

type~~attribute~~InheritedByGraph type~attribute Attribute type~pair~9 pair type~pair~9->type~attribute value type~tvector~9 tVector type~tvector~9->type~pair~9 elements type~set2~10 set2 type~set2~10->type~tvector~9 items type~s_iterator~10 s_iterator type~s_iterator~10->type~set2~10 reference type~stringattributemap StringAttributeMap type~stringattributemap->type~set2~10 tree

Constructor

public interface Attribute

  • private function new_Attribute_empty() result(attr)

    Arguments

    None

    Return Value type(Attribute)

  • private function new_Attribute_0d(value, rc) result(attr)

    Arguments

    Type IntentOptional Attributes Name
    class(*), intent(in) :: value
    integer, intent(out), optional :: rc

    Return Value type(Attribute)

  • private function new_Attribute_1d(values, rc) result(attr)

    Arguments

    Type IntentOptional Attributes Name
    class(*), intent(in) :: values(:)
    integer, intent(out), optional :: rc

    Return Value type(Attribute)


Type-Bound Procedures

procedure, public :: destroy

  • private subroutine destroy(this, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(UnlimitedEntity), intent(inout) :: this
    integer, intent(out), optional :: rc

procedure, public :: equal

  • private function equal(a, b)

    equals() - returns true if-and-only-if a and b are the same type, kind, shape, and have the same values.

    Only intrinsic data types are supported.

    Ugly nested SELECT TYPE is unfortunately necessary.

    Arguments

    Type IntentOptional Attributes Name
    class(UnlimitedEntity), intent(in), target :: a
    type(UnlimitedEntity), intent(in), target :: b

    Return Value logical

procedure, public :: equal_attr

  • private function equal_attr(a, b)

    Arguments

    Type IntentOptional Attributes Name
    class(Attribute), intent(in), target :: a
    type(Attribute), intent(in), target :: b

    Return Value logical

procedure, public :: get_rank

  • private function get_rank(this, rc) result(rank)

    Arguments

    Type IntentOptional Attributes Name
    class(UnlimitedEntity), intent(in) :: this
    integer, intent(out), optional :: rc

    Return Value integer

procedure, public :: get_shape

  • private function get_shape(this, rc) result(shp)

    Simple accessor

    Arguments

    Type IntentOptional Attributes Name
    class(UnlimitedEntity), intent(in) :: this
    integer, intent(out), optional :: rc

    Return Value integer, allocatable, (:)

procedure, public :: get_string

  • private function get_string(this, rc) result(string)

    Arguments

    Type IntentOptional Attributes Name
    class(UnlimitedEntity), intent(in), target :: this
    integer, intent(out), optional :: rc

    Return Value character(len=:), allocatable

procedure, public :: get_value

  • private function get_value(this, rc) result(value)

    get string or scalar

    Arguments

    Type IntentOptional Attributes Name
    class(UnlimitedEntity), intent(in), target :: this
    integer, intent(out), optional :: rc

    Return Value class(*), pointer

procedure, public :: get_values

  • private function get_values(this, rc) result(values)

    get 1d , need get_shape to get back to original array

    Arguments

    Type IntentOptional Attributes Name
    class(UnlimitedEntity), intent(in), target :: this
    integer, intent(out), optional :: rc

    Return Value class(*), pointer, (:)

procedure, public :: is_empty

  • private function is_empty(this, rc) result(yes)

    Arguments

    Type IntentOptional Attributes Name
    class(UnlimitedEntity), intent(in), target :: this
    integer, intent(out), optional :: rc

    Return Value logical

procedure, public :: not_equal

  • private function not_equal(a, b)

    Arguments

    Type IntentOptional Attributes Name
    class(UnlimitedEntity), intent(in) :: a
    type(UnlimitedEntity), intent(in) :: b

    Return Value logical

procedure, public :: not_equal_attr

  • private function not_equal_attr(a, b)

    Arguments

    Type IntentOptional Attributes Name
    class(Attribute), intent(in), target :: a
    type(Attribute), intent(in), target :: b

    Return Value logical

generic, public :: operator(/=) => not_equal, not_equal_attr

  • private function not_equal(a, b)

    Arguments

    Type IntentOptional Attributes Name
    class(UnlimitedEntity), intent(in) :: a
    type(UnlimitedEntity), intent(in) :: b

    Return Value logical

  • private function not_equal_attr(a, b)

    Arguments

    Type IntentOptional Attributes Name
    class(Attribute), intent(in), target :: a
    type(Attribute), intent(in), target :: b

    Return Value logical

generic, public :: operator(==) => equal, equal_attr

  • private function equal(a, b)

    equals() - returns true if-and-only-if a and b are the same type, kind, shape, and have the same values.

    Only intrinsic data types are supported.

    Ugly nested SELECT TYPE is unfortunately necessary.

    Arguments

    Type IntentOptional Attributes Name
    class(UnlimitedEntity), intent(in), target :: a
    type(UnlimitedEntity), intent(in), target :: b

    Return Value logical

  • private function equal_attr(a, b)

    Arguments

    Type IntentOptional Attributes Name
    class(Attribute), intent(in), target :: a
    type(Attribute), intent(in), target :: b

    Return Value logical

procedure, public :: serialize

  • private subroutine serialize(this, buffer, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(UnlimitedEntity), intent(in), target :: this
    integer, intent(inout), allocatable :: buffer(:)
    integer, intent(out), optional :: rc

procedure, public :: set

  • private subroutine set(this, value, rc)

    Set string or scalar

    Arguments

    Type IntentOptional Attributes Name
    class(UnlimitedEntity), intent(inout) :: this
    class(*), intent(in) :: value
    integer, intent(out), optional :: rc

Source Code

   type,extends(UnlimitedEntity) :: Attribute
   contains
      generic :: operator(==) => equal_attr
      generic :: operator(/=) => not_equal_attr
      procedure :: equal_attr
      procedure :: not_equal_attr
   end type Attribute