UnlimitedEntity Derived Type

type, public :: UnlimitedEntity


Inherited by

type~~unlimitedentity~~InheritedByGraph type~unlimitedentity UnlimitedEntity type~attribute Attribute type~attribute->type~unlimitedentity type~pair~7 pair type~pair~7->type~unlimitedentity value type~variable Variable type~variable->type~unlimitedentity const_value type~coordinatevariable CoordinateVariable type~coordinatevariable->type~variable type~filemetadata FileMetadata type~filemetadata->type~variable global_var type~pair~2 Pair type~pair~2->type~variable second type~pair~9 pair type~pair~9->type~attribute value type~tvector~7 tVector type~tvector~7->type~pair~7 elements type~addwritedatacollectionmessage AddWriteDataCollectionMessage type~addwritedatacollectionmessage->type~filemetadata fmd type~cfiocollection CFIOCollection type~cfiocollection->type~filemetadata file type~extdatafilestream ExtDataFileStream type~extdatafilestream->type~filemetadata metadata type~filemetadatautils FileMetadataUtils type~filemetadatautils->type~filemetadata metadata type~filemetadatavector FileMetadataVector type~filemetadatavector->type~filemetadata elements type~filemetadatavectoriterator FileMetadataVectorIterator type~filemetadatavectoriterator->type~filemetadata elements type~filemetadatavectorriterator FileMetadataVectorRIterator type~filemetadatavectorriterator->type~filemetadata elements type~historycollection HistoryCollection type~historycollection->type~filemetadata fmd type~map_s_node~15 map_s_Node type~map_s_node~15->type~pair~2 value type~mapl_griddedio MAPL_GriddedIO type~mapl_griddedio->type~filemetadata metadata type~masksamplergeosat MaskSamplerGeosat type~masksamplergeosat->type~filemetadata metadata type~obs_unit obs_unit type~obs_unit->type~filemetadata metadata type~pfio_vector PFIO_Vector type~pfio_vector->type~filemetadata elements type~pfio_vectoriterator PFIO_VectorIterator type~pfio_vectoriterator->type~filemetadata elements type~pfio_vectorriterator PFIO_VectorRIterator type~pfio_vectorriterator->type~filemetadata elements type~regridsupport RegridSupport type~regridsupport->type~filemetadata cfio_cubed_sphere, cfio_lat_lon type~replacemetadatamessage ReplaceMetadataMessage type~replacemetadatamessage->type~filemetadata fmd type~sampler sampler type~sampler->type~filemetadata metadata type~set2~8 set2 type~set2~8->type~tvector~7 items type~stationsampler StationSampler type~stationsampler->type~filemetadata metadata type~tvector~9 tVector type~tvector~9->type~pair~9 elements

Constructor

public interface UnlimitedEntity

  • private function new_UnlimitedEntity_empty() result(attr)

    Arguments

    None

    Return Value type(UnlimitedEntity)

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

    Arguments

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

    Return Value type(UnlimitedEntity)

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

    Arguments

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

    Return Value type(UnlimitedEntity)

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

    Arguments

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

    Return Value type(UnlimitedEntity)

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

    Arguments

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

    Return Value type(UnlimitedEntity)

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

    Arguments

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

    Return Value type(UnlimitedEntity)

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

    Arguments

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

    Return Value type(UnlimitedEntity)


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

generic, public :: operator(/=) => 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

generic, public :: operator(==) => 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 :: 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 :: UnlimitedEntity
      private
      integer, allocatable :: shape(:)
      class (*), allocatable :: value
      class (*), allocatable :: values(:)
      logical :: valid = .false. !! just to avoid warning for empty constructor
   contains
      procedure :: get_shape
      procedure :: get_rank
      procedure :: get_value
      procedure :: get_values
      generic :: operator(==) => equal
      generic :: operator(/=) => not_equal
      procedure :: equal
      procedure :: not_equal
      procedure :: set
      procedure :: serialize
      procedure :: get_string
      procedure :: is_empty
      procedure :: destroy
   end type UnlimitedEntity